shouldSkipSpace is no more needed in finishToken.
This commit is contained in:
parent
ad9411d2ae
commit
7e85da74cb
6
acorn.js
6
acorn.js
@ -662,12 +662,12 @@
|
||||
// after the token, so that the next one's `tokStart` will point at
|
||||
// the right position.
|
||||
|
||||
function finishToken(type, val, shouldSkipSpace) {
|
||||
function finishToken(type, val) {
|
||||
tokEnd = tokPos;
|
||||
if (options.locations) tokEndLoc = curPosition();
|
||||
var prevType = tokType;
|
||||
tokType = type;
|
||||
if (shouldSkipSpace !== false) skipSpace();
|
||||
skipSpace();
|
||||
tokVal = val;
|
||||
|
||||
// Update context info
|
||||
@ -686,7 +686,7 @@
|
||||
} else if (type.keyword && prevType == _dot) {
|
||||
tokExprAllowed = false;
|
||||
} else if (tokExprAllowed && type == _function) {
|
||||
tokExprAllowed = null;
|
||||
tokExprAllowed = false;
|
||||
} else {
|
||||
tokExprAllowed = type.beforeExpr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user