parent
431a44bc74
commit
e271168cf6
11
acorn.js
11
acorn.js
@ -634,9 +634,6 @@
|
||||
if (shouldSkipSpace !== false) skipSpace();
|
||||
tokVal = val;
|
||||
tokRegexpAllowed = type.beforeExpr;
|
||||
if (options.onToken) {
|
||||
options.onToken(new Token());
|
||||
}
|
||||
}
|
||||
|
||||
function skipBlockComment() {
|
||||
@ -1232,6 +1229,9 @@
|
||||
// Continue to the next token.
|
||||
|
||||
function next() {
|
||||
if (options.onToken)
|
||||
options.onToken(new Token());
|
||||
|
||||
lastStart = tokStart;
|
||||
lastEnd = tokEnd;
|
||||
lastEndLoc = tokEndLoc;
|
||||
@ -1542,9 +1542,7 @@
|
||||
first = false;
|
||||
}
|
||||
|
||||
lastStart = tokStart;
|
||||
lastEnd = tokEnd;
|
||||
lastEndLoc = tokEndLoc;
|
||||
next();
|
||||
return finishNode(node, "Program");
|
||||
}
|
||||
|
||||
@ -2664,5 +2662,4 @@
|
||||
node.generator = isGenerator;
|
||||
return finishNode(node, "ComprehensionExpression");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -28757,6 +28757,7 @@ var tokTypes = acorn.tokTypes;
|
||||
|
||||
test('var x = (1 + 2)', {}, {
|
||||
locations: true,
|
||||
loose: false,
|
||||
onToken: [
|
||||
{
|
||||
type: tokTypes._var,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user