1+ {
2+ "name" : " Node.Js" ,
3+ "ext" : " js" ,
4+ "h_ext" : " js" ,
5+
6+ "line_end" : " ;" ,
7+
8+ "ident" : " {{name}}" ,
9+ "true" : " true" ,
10+ "false" : " false" ,
11+
12+ "bracket" : {
13+ "block_open" : " {" ,
14+ "block_close" : " }" ,
15+
16+ "value_open" : " (" ,
17+ "value_close" : " )" ,
18+
19+ "dotarray_open" : " [" ,
20+ "dotarray_close" : " ]" ,
21+
22+ "list_open" : " [" ,
23+ "list_close" : " ]"
24+ },
25+ "operator" : {
26+ "commas" : " ," ,
27+
28+ "pointer" : " [{{exp}}]" ,
29+ "de_pointer" : " {{exp}}[0]" ,
30+
31+ "await" : " (await {{exp}})" ,
32+ "async" : " (async {{exp}})" ,
33+
34+ "tenary" : " (({{condition}})?({{l}}):({{r}}))" ,
35+ "assign" : " ({{l}} = {{r}})" ,
36+
37+ "plus" : " ({{l}} + {{r}})" ,
38+ "minus" : " ({{l}} - {{r}})" ,
39+
40+ "bitor" : " ({{l}} | {{r}})" ,
41+ "or" : " ({{l}} || {{r}})" ,
42+ "bitand" : " ({{l}} & {{r}})" ,
43+ "and" : " ({{l}} && {{r}})" ,
44+
45+ "eq" : " ({{l}} == {{r}})" ,
46+ "neq" : " ({{l}} != {{r}})" ,
47+
48+ "pair" : " { {{l}} : {{r}} }" ,
49+
50+ "property" : " {{object}}.{{name}}" ,
51+ "context" : " {{context}}.{{member}}" ,
52+ "index" : " {{exp}}[{{at}}]" ,
53+
54+ "else" : " ({{l}} {{operator}} {{r}})"
55+ },
56+ "blocks" : {
57+ "if" : " if ({{exp}}) { {{block}} }" ,
58+ "else_if" : " else if ({{exp}}) { {{block}} }" ,
59+ "else" : " else { {{block}} }" ,
60+
61+ "while" : " while ({{exp}}) { {{block}} }" ,
62+ "repeat" : " for (let {{var}} = 0; {{var}}<{{time}}; {{var}}++) { {{block}} }" ,
63+ "foreach" : " for ({{var}} of {{collection}}) { {{block}} }"
64+ },
65+ "calls" : {
66+ "call" : " {{method}}({{args}})" ,
67+ "call_wrapped" : " {{method}}{{args}}" ,
68+ "method_call" : " {{object}}.{{call}}"
69+ },
70+ "types" : {
71+ "deduce_type" : " let" ,
72+ "constant" : " " ,
73+ "void_type" : " " ,
74+ "integer" : " " ,
75+
76+ "_constant" : " const" ,
77+ "_void_type" : " void" ,
78+ "_integer" : " Number"
79+ },
80+
81+ "lambda_blocks" : " ({{args}})=>{{ {block} }}" ,
82+ "to_lambdas" : " (...pp)=>({{function}}({{args}}pp...))" ,
83+ "lambdas" : " ({{args}}) => ( {{exp}} )" ,
84+
85+ "returns" : " return ({{exp}});" ,
86+
87+ "_namespaces" : " namespace {{name}} { {{block}} }" ,
88+
89+ "iter_vars" : " let {{name}}" ,
90+ "arg_vars" : " {{name}}" ,
91+
92+ "header_guards" : " {{contents}}" ,
93+
94+ "funcs" : {
95+ "functions" : " function {{name}}({{args}}) { {{block}} }" ,
96+ "constructor" : " constructor({{args}}){ {{block}} }" ,
97+ "entry" : " (async ()=>{ {{block}} })();"
98+ },
99+ "assigns" : {
100+ "reference" : {
101+ "const" : " const {{name}} = {{ref}}" ,
102+ "make" : " let {{name}} = {{ref}}" ,
103+ "let" : " let {{name}} = {{ref}}" ,
104+ "instance" : " "
105+ },
106+ "copy" : {
107+ "const" : " const {{name}} = {{copy}}" ,
108+ "make" : " let {{name}} = new {{type}}({{copy}})" ,
109+ "let" : " let {{name}} = {{copy}}" ,
110+ "instance" : " "
111+ },
112+ "construct" : {
113+ "const" : " const {{type}} {{name}}({{args}})" ,
114+ "make" : " let {{name}} = new {{type}}({{args}})" ,
115+ "let" : " let {{name}} = new {{type}}({{args}})" ,
116+ "instance" : " "
117+ }
118+ },
119+ "imports" : {
120+ "import" : " const {{path}} = require('{{path}}');\n " ,
121+ "stdlib" : " const{print,println,input,input_line,static_input,static_input_line,tup,vec,until,sum,max,map,cat,each,fold,bfold,integrate,filter,wait,get_time,make_string,stoi,string,vector,i1,i2,i4,i8,u1,u2,u4,u8,f4,f8,ci1,ci2,ci4,ci8,cu1,cu2,cu4,cu8,cf4,cf8}=require('./worldlib');\n " ,
122+ "library" : " const {{path}} = require('{{path}}');\n " ,
123+
124+ "targetstdlibpath" : " worldlib.js" ,
125+ "stdlibpath" : " ../libs/worldlib.js"
126+ },
127+ "classes" : {
128+ "inherit" : " class {{name}} extends {{super}} { {{block}} }" ,
129+ "class" : " class {{name}}{ {{block}} }"
130+ },
131+ "access" : {
132+ "protected" : " " ,
133+ "private" : " " ,
134+ "public" : " " ,
135+
136+ "_protected" : " protected" ,
137+ "_private" : " private" ,
138+ "_public" : " public"
139+ }
140+ }
0 commit comments