fixing indentation for prefix while nodes
This commit is contained in:
parent
b9f1390405
commit
55cac23976
|
@ -392,7 +392,7 @@
|
|||
While: [o("WhileSource Block", function() {
|
||||
return $1.add_body($2);
|
||||
}), o("Expression WhileSource", function() {
|
||||
return $2.add_body($1);
|
||||
return $2.add_body(Expressions.wrap([$1]));
|
||||
})
|
||||
],
|
||||
// Array, object, and range comprehensions, at the most generic level.
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
idt = this.tab || '';
|
||||
num = (tabs || 0) + 1;
|
||||
while (num -= 1) {
|
||||
idt += TAB
|
||||
idt += TAB;
|
||||
}
|
||||
return idt;
|
||||
};
|
||||
|
|
|
@ -257,7 +257,7 @@ case 122:this.$ = new WhileNode($$[$0-4+2-1], {
|
|||
break;
|
||||
case 123:this.$ = $$[$0-2+1-1].add_body($$[$0-2+2-1]);
|
||||
break;
|
||||
case 124:this.$ = $$[$0-2+2-1].add_body($$[$0-2+1-1]);
|
||||
case 124:this.$ = $$[$0-2+2-1].add_body(Expressions.wrap([$$[$0-2+1-1]]));
|
||||
break;
|
||||
case 125:this.$ = new ForNode($$[$0-4+1-1], $$[$0-4+4-1], $$[$0-4+3-1][0], $$[$0-4+3-1][1]);
|
||||
break;
|
||||
|
|
|
@ -371,7 +371,7 @@ grammar: {
|
|||
# or postfix, with a single expression. There is no do..while.
|
||||
While: [
|
||||
o "WhileSource Block", -> $1.add_body $2
|
||||
o "Expression WhileSource", -> $2.add_body $1
|
||||
o "Expression WhileSource", -> $2.add_body Expressions.wrap [$1]
|
||||
]
|
||||
|
||||
# Array, object, and range comprehensions, at the most generic level.
|
||||
|
|
Loading…
Reference in New Issue