mirror of
https://github.com/sasjs/core.git
synced 2026-01-03 23:50:06 +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")
|
infile = io.open (sas.symget("fpath1"), "r")
|
||||||
outfile = io.open (sas.symget("fpath2"), "w")
|
outfile = io.open (sas.symget("fpath2"), "w")
|
||||||
io.input(infile)
|
io.input(infile)
|
||||||
local resp=json2sas.decode(io.read())
|
local resp=json.decode(io.read())
|
||||||
local job=resp["code"]
|
local job=resp["code"]
|
||||||
outfile:write(job)
|
outfile:write(job)
|
||||||
io.close(infile)
|
io.close(infile)
|
||||||
@@ -13549,7 +13549,7 @@ filename &fref1 clear;
|
|||||||
data _null_;
|
data _null_;
|
||||||
file "%sysfunc(pathname(work))/ml_json.lua";
|
file "%sysfunc(pathname(work))/ml_json.lua";
|
||||||
put '-- ';
|
put '-- ';
|
||||||
put '-- json.lua (modified from json.lua) ';
|
put '-- json.lua ';
|
||||||
put '-- ';
|
put '-- ';
|
||||||
put '-- Copyright (c) 2019 rxi ';
|
put '-- Copyright (c) 2019 rxi ';
|
||||||
put '-- ';
|
put '-- ';
|
||||||
@@ -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;
|
||||||
|
|||||||
7
build.py
7
build.py
@@ -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
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ HTML_FOOTER = ./doxy/new_footer.html
|
|||||||
HTML_EXTRA_STYLESHEET = ./doxy/new_stylesheet.css
|
HTML_EXTRA_STYLESHEET = ./doxy/new_stylesheet.css
|
||||||
INHERIT_DOCS = NO
|
INHERIT_DOCS = NO
|
||||||
INLINE_INFO = NO
|
INLINE_INFO = NO
|
||||||
INPUT = base meta metax viya
|
INPUT = base meta metax viya lua
|
||||||
LAYOUT_FILE = ./doxy/DoxygenLayout.xml
|
LAYOUT_FILE = ./doxy/DoxygenLayout.xml
|
||||||
MAX_INITIALIZER_LINES = 0
|
MAX_INITIALIZER_LINES = 0
|
||||||
PROJECT_NAME = Macro Core
|
PROJECT_NAME = Macro Core
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ mkdir $BUILD_FOLDER
|
|||||||
cp -r base $BUILD_FOLDER
|
cp -r base $BUILD_FOLDER
|
||||||
cp -r meta $BUILD_FOLDER
|
cp -r meta $BUILD_FOLDER
|
||||||
cp -r metax $BUILD_FOLDER
|
cp -r metax $BUILD_FOLDER
|
||||||
|
cp -r lua $BUILD_FOLDER
|
||||||
cp -r viya $BUILD_FOLDER
|
cp -r viya $BUILD_FOLDER
|
||||||
cp -r doxy $BUILD_FOLDER
|
cp -r doxy $BUILD_FOLDER
|
||||||
cp main.dox $BUILD_FOLDER
|
cp main.dox $BUILD_FOLDER
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--
|
--
|
||||||
-- json.lua (modified from json.lua)
|
-- json.lua
|
||||||
--
|
--
|
||||||
-- Copyright (c) 2019 rxi
|
-- Copyright (c) 2019 rxi
|
||||||
--
|
--
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
-- SOFTWARE.
|
-- SOFTWARE.
|
||||||
--
|
--
|
||||||
|
|
||||||
local json = { _version = "0.1.2" }
|
json = { _version = "0.1.2" }
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Encode
|
-- Encode
|
||||||
@@ -368,4 +368,4 @@ function json.decode(str)
|
|||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
return json
|
return json
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
data _null_;
|
data _null_;
|
||||||
file "%sysfunc(pathname(work))/ml_json.lua";
|
file "%sysfunc(pathname(work))/ml_json.lua";
|
||||||
put '-- ';
|
put '-- ';
|
||||||
put '-- json.lua (modified from json.lua) ';
|
put '-- json.lua ';
|
||||||
put '-- ';
|
put '-- ';
|
||||||
put '-- Copyright (c) 2019 rxi ';
|
put '-- Copyright (c) 2019 rxi ';
|
||||||
put '-- ';
|
put '-- ';
|
||||||
@@ -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;
|
||||||
|
|||||||
11
main.dox
11
main.dox
@@ -50,4 +50,15 @@
|
|||||||
* No X command
|
* No X command
|
||||||
* Prefixes: _mv_
|
* 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")
|
infile = io.open (sas.symget("fpath1"), "r")
|
||||||
outfile = io.open (sas.symget("fpath2"), "w")
|
outfile = io.open (sas.symget("fpath2"), "w")
|
||||||
io.input(infile)
|
io.input(infile)
|
||||||
local resp=json2sas.decode(io.read())
|
local resp=json.decode(io.read())
|
||||||
local job=resp["code"]
|
local job=resp["code"]
|
||||||
outfile:write(job)
|
outfile:write(job)
|
||||||
io.close(infile)
|
io.close(infile)
|
||||||
|
|||||||
Reference in New Issue
Block a user