Map the end of block statement nodes to the end of their original location - fixes T7258

This commit is contained in:
Logan Smyth
2016-04-10 23:22:49 -07:00
parent 76bb1dffaa
commit 81e6d4147d
4 changed files with 6 additions and 3 deletions

View File

@@ -22,8 +22,11 @@ export function BlockStatement(node: Object) {
this.printSequence(node.body, node, { indent: true });
if (!this.format.retainLines && !this.format.concise) this.removeLast("\n");
this.source("end", node.loc);
this.rightBrace();
} else {
this.source("end", node.loc);
this.push("}");
}
}