You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val script= """
function execute() {
var c = 'a'.charCodeAt(0);
while (c <= 'z'.charCodeAt(0)) {
yield String.fromCharCode(c++);
}
}
for (let h in execute()) out.println(h)
""".trimIndent()
There are no ES6-style generators in Rhino yet. There has been an incomplete PR from a long time ago but it's a pretty complex set of changes and doesn't quite work.
Anyone who is looking for a project might want to check out the incomplete work that is referenced in Issue 411:
I am trying to build AST of the following javascript (es6) file using the code below and I am getting an empty AST.
function * foo(x) {
while (true) {
x = x * 2;
yield x;
}
}
var g = foo(2);
console.log('start')
console.log(g.next())
console.log(g.next())
console.log(g.next())
The code for buiding the AST :
The text was updated successfully, but these errors were encountered: