mirror of
https://github.com/sasjs/core.git
synced 2025-12-27 04:50:05 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45f858db15 | ||
|
|
b4d97a063a |
9
all.sas
9
all.sas
@@ -12374,7 +12374,7 @@ data _null_;
|
||||
infile = io.open (sas.symget("fpath1"), "r")
|
||||
outfile = io.open (sas.symget("fpath2"), "w")
|
||||
io.input(infile)
|
||||
local resp=json2sas.decode(io.read())
|
||||
local resp=json.decode(io.read())
|
||||
local job=resp["code"]
|
||||
outfile:write(job)
|
||||
io.close(infile)
|
||||
@@ -13549,7 +13549,7 @@ filename &fref1 clear;
|
||||
data _null_;
|
||||
file "%sysfunc(pathname(work))/ml_json.lua";
|
||||
put '-- ';
|
||||
put '-- json.lua (modified from json.lua) ';
|
||||
put '-- json.lua ';
|
||||
put '-- ';
|
||||
put '-- Copyright (c) 2019 rxi ';
|
||||
put '-- ';
|
||||
@@ -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;
|
||||
|
||||
7
build.py
7
build.py
@@ -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
|
||||
|
||||
@@ -19,7 +19,7 @@ HTML_FOOTER = ./doxy/new_footer.html
|
||||
HTML_EXTRA_STYLESHEET = ./doxy/new_stylesheet.css
|
||||
INHERIT_DOCS = NO
|
||||
INLINE_INFO = NO
|
||||
INPUT = base meta metax viya
|
||||
INPUT = base meta metax viya lua
|
||||
LAYOUT_FILE = ./doxy/DoxygenLayout.xml
|
||||
MAX_INITIALIZER_LINES = 0
|
||||
PROJECT_NAME = Macro Core
|
||||
|
||||
@@ -16,6 +16,7 @@ mkdir $BUILD_FOLDER
|
||||
cp -r base $BUILD_FOLDER
|
||||
cp -r meta $BUILD_FOLDER
|
||||
cp -r metax $BUILD_FOLDER
|
||||
cp -r lua $BUILD_FOLDER
|
||||
cp -r viya $BUILD_FOLDER
|
||||
cp -r doxy $BUILD_FOLDER
|
||||
cp main.dox $BUILD_FOLDER
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- json.lua (modified from json.lua)
|
||||
-- json.lua
|
||||
--
|
||||
-- Copyright (c) 2019 rxi
|
||||
--
|
||||
@@ -22,7 +22,7 @@
|
||||
-- SOFTWARE.
|
||||
--
|
||||
|
||||
local json = { _version = "0.1.2" }
|
||||
json = { _version = "0.1.2" }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Encode
|
||||
@@ -368,4 +368,4 @@ function json.decode(str)
|
||||
return res
|
||||
end
|
||||
|
||||
return json
|
||||
return json
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
data _null_;
|
||||
file "%sysfunc(pathname(work))/ml_json.lua";
|
||||
put '-- ';
|
||||
put '-- json.lua (modified from json.lua) ';
|
||||
put '-- json.lua ';
|
||||
put '-- ';
|
||||
put '-- Copyright (c) 2019 rxi ';
|
||||
put '-- ';
|
||||
@@ -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;
|
||||
|
||||
11
main.dox
11
main.dox
@@ -50,4 +50,15 @@
|
||||
* No X command
|
||||
* Prefixes: _mv_
|
||||
|
||||
*/
|
||||
|
||||
/*! \dir lua
|
||||
* \brief Lua macros
|
||||
* \details These macros have the following attributes:
|
||||
|
||||
* OS independent
|
||||
* Work as LUA functions (they are immediately executed/compiled)
|
||||
* Auto-generated from the plain source `.lua` files in the same directory
|
||||
* Prefixes: _ml_
|
||||
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ data _null_;
|
||||
infile = io.open (sas.symget("fpath1"), "r")
|
||||
outfile = io.open (sas.symget("fpath2"), "w")
|
||||
io.input(infile)
|
||||
local resp=json2sas.decode(io.read())
|
||||
local resp=json.decode(io.read())
|
||||
local job=resp["code"]
|
||||
outfile:write(job)
|
||||
io.close(infile)
|
||||
|
||||
Reference in New Issue
Block a user