onilabs / stratifiedjs

Oni StratifiedJS (previously Apollo)
http://onilabs.com/stratifiedjs
Other
228 stars 22 forks source link

labeled statements in __js blocks #10

Open afri opened 12 years ago

afri commented 12 years ago

The following code gives an error:

__js {

X: for(var i=0; i<foo;++i) { ... continue X; }

}

The problem is that our compiler translates this to:

X: i=0; for(;i<foo;++i) { ... continue X; }

I.e. the variable initialization gets pulled out of the 'for' statement.

shannah commented 9 years ago

I'm trying to "stratify" a large amount of javascript code that includes labeled statements. Are there any plans to add support for labeled statements?