1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +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 '-- ';
put ' ';
put 'local json = { _version = "0.1.2" } ';
put 'json = { _version = "0.1.2" } ';
put ' ';
put '------------------------------------------------------------------------------- ';
put '-- Encode ';
@@ -13920,6 +13920,7 @@ data _null_;
put ' ';
put 'return json ';
run;
%mend;
%inc "%sysfunc(pathname(work))/ml_json.lua";
%mend;

View File

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

View File

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

View File

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