nv-js-dot-ir
v1.0.0
Published
nv-js-dot-ir ====================== - opt\_mem\_expr AND mem\_expr AND opt\_call\_expr map-to two-params-simple-lambda - for copy/paste in nvlang
Downloads
13
Readme
nv-js-dot-ir
- opt_mem_expr AND mem_expr AND opt_call_expr map-to two-params-simple-lambda
- for copy/paste in nvlang
install
- npm install nv-js-dot-ir
usage
APIS
{
NAME_TO_OP: { opt_mem: '?.', opt_call: '?.%call', mem: '.' },
OP_TO_NAME: { '?.': 'opt_mem', '?.%call': 'opt_call', '.': 'mem' },
OP_TO_FUNC: {
'.': [Function: .],
'?.': [Function: ?.],
'?.%call': [Function: ?.%call]
},
NAME_TO_FUNC: {
mem: [Function: .],
opt_mem: [Function: ?.],
opt_call: [Function: ?.%call]
},
OP_TO_FUNC_RTRN_AST: {
'.': [Function: .],
'?.': [Function: ?.],
'?.%call': [Function: ?.%call]
},
NAME_TO_FUNC_RTRN_AST: {
opt_mem: [Function: ?.],
opt_call: [Function: ?.%call],
mem: [Function: .]
},
INCLUDES: 'const ___mem = (a,b)=>a[b];\n' +
'const ___opt_mem = (a,b)=> {\n' +
' if(a===null || a === undefined) {\n' +
' return(undefined)\n' +
' } else {\n' +
' return(a[b])\n' +
' }\n' +
' };\n' +
'const ___opt_call = (a,args_ary)=> {\n' +
' if(a===null || a === undefined) {\n' +
' return(undefined)\n' +
' } else {\n' +
' //args_ary should be a param-array\n' +
' return(a(...args_ary))\n' +
' }\n' +
' };',
___opt_mem: [Function: ?.],
___opt_call: [Function: ?.%call],
___mem: [Function: .],
OP_TO_CALL_AST: {
'.': [Function: ast],
'?.': [Function: ast],
'?.%call': [Function: ast]
},
NAME_TO_CALL_AST: {
mem: [Function: ast],
opt_mem: [Function: ast],
opt_call: [Function: ast]
}
}
LICENSE
- ISC