Fix start offset of block nodes

This commit is contained in:
Marijn Haverbeke
2013-02-20 10:48:36 +01:00
parent 782259bea1
commit 72d2fc2644

View File

@@ -397,9 +397,10 @@
}
function parseBlock() {
var node = startNode();
pushCx();
expect(tt.braceL);
var node = startNode(), blockIndent = curIndent, line = curLineStart;
var blockIndent = curIndent, line = curLineStart;
node.body = [];
while (!closesBlock(tt.braceR, blockIndent, line))
node.body.push(parseStatement());