lots'o'fixes in the output routines; still a looong way to go.

This commit is contained in:
Mihai Bazon
2012-08-16 19:54:37 +03:00
parent 7f273c3b89
commit c7c163b82e
4 changed files with 161 additions and 78 deletions

View File

@@ -866,6 +866,9 @@ function parse($TEXT, exigent_mode) {
init = is("keyword", "var")
? (next(), var_(true))
: expression(true, true);
if (init instanceof AST_Var) {
init.inline = true;
}
if (is("operator", "in")) {
if (init instanceof AST_Var && init.definitions.length > 1)
croak("Only one variable declaration allowed in for..in loop");