Open
Description
Currently we can use any reserved word/token (such as var
, if
, etc) as identifier in naskah which won't be valid JS. The simplest thing we can do is add underscore before printing the identifier if it's a reserved word in JS
So that:
misal x = 3;
misal var = 2;
jika while benar {
}
should be compiled to
var x = 3;
var _var = 2;
if (_while == true) {
}
Activity