Talk:Canvas Nasal/JavaScript Subset

Revision as of 15:22, 27 January 2018 by Hooray (Talk | contribs) (add old stub ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Revision as of 15:22, 27 January 2018 by Hooray (Talk | contribs) (add old stub ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
if (typeof(0) == 'scalar') {
console = {log: print};
}
else {
compile = eval("new Function('src','return new Function(src);')");
}

var runtime = compile("return (typeof(0)=='scalar')? 'nasal':'javascript';");

Wrapper = {

'nasal': {
 setprop: compile(0),
 getprop: compile(1),
 fgcommand: compile(2)
 },

'javascript': {
 }

};


console.log( runtime() );
Return to "Canvas Nasal/JavaScript Subset" page.