1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-13 11:30:05 +00:00

fix: scope of json var, brining the %inc _inside_ the macro

This commit is contained in:
Allan Bowe
2021-01-03 22:35:56 +00:00
parent b4d97a063a
commit 45f858db15
4 changed files with 11 additions and 8 deletions

View File

@@ -13572,7 +13572,7 @@ data _null_;
put '-- SOFTWARE. '; put '-- SOFTWARE. ';
put '-- '; put '-- ';
put ' '; put ' ';
put 'local json = { _version = "0.1.2" } '; put 'json = { _version = "0.1.2" } ';
put ' '; put ' ';
put '------------------------------------------------------------------------------- '; put '------------------------------------------------------------------------------- ';
put '-- Encode '; put '-- Encode ';
@@ -13920,6 +13920,7 @@ data _null_;
put ' '; put ' ';
put 'return json '; put 'return json ';
run; run;
%mend;
%inc "%sysfunc(pathname(work))/ml_json.lua"; %inc "%sysfunc(pathname(work))/ml_json.lua";
%mend;

View File

@@ -21,9 +21,10 @@ for file in files:
with open(file) as infile: with open(file) as infile:
for line in infile: for line in infile:
ml.write(" put '" + line.rstrip().replace("'","''") + " ';\n") ml.write(" put '" + line.rstrip().replace("'","''") + " ';\n")
ml.write("run;\n") ml.write("run;\n\n")
ml.write("%mend;\n\n") ml.write("%inc \"%sysfunc(pathname(work))/" + name + ".lua\";\n\n")
ml.write("%inc \"%sysfunc(pathname(work))/" + name + ".lua\";\n") ml.write("%mend;\n")
ml.close() ml.close()
# prepare web files # prepare web files

View File

@@ -22,7 +22,7 @@
-- SOFTWARE. -- SOFTWARE.
-- --
local json = { _version = "0.1.2" } json = { _version = "0.1.2" }
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Encode -- Encode

View File

@@ -36,7 +36,7 @@ data _null_;
put '-- SOFTWARE. '; put '-- SOFTWARE. ';
put '-- '; put '-- ';
put ' '; put ' ';
put 'local json = { _version = "0.1.2" } '; put 'json = { _version = "0.1.2" } ';
put ' '; put ' ';
put '------------------------------------------------------------------------------- '; put '------------------------------------------------------------------------------- ';
put '-- Encode '; put '-- Encode ';
@@ -384,6 +384,7 @@ data _null_;
put ' '; put ' ';
put 'return json '; put 'return json ';
run; run;
%mend;
%inc "%sysfunc(pathname(work))/ml_json.lua"; %inc "%sysfunc(pathname(work))/ml_json.lua";
%mend;