upgrade AST<->ESTree translation (#4870)

fixes #968
This commit is contained in:
Alex Lam S.L
2021-04-26 04:23:52 +08:00
committed by GitHub
parent 80efaa2f33
commit 324587f769
8 changed files with 801 additions and 177 deletions

View File

@@ -2526,7 +2526,7 @@ function parse($TEXT, options) {
while (!is("eof"))
body.push(statement());
S.input.pop_directives_stack();
var end = prev();
var end = prev() || start;
var toplevel = options.toplevel;
if (toplevel) {
toplevel.body = toplevel.body.concat(body);