fix(babel-parser): Fix end of range of SequenceExpression (#13731)

This commit is contained in:
Sosuke Suzuki
2021-09-04 19:01:20 +09:00
committed by GitHub
parent 0d5ca876fd
commit 62e42a3f60
3 changed files with 55 additions and 6 deletions

View File

@@ -1735,8 +1735,7 @@ export default class ExpressionParser extends LValParser {
val.expressions = exprList;
// finish node at current location so it can pick up comments after `)`
this.finishNode(val, "SequenceExpression");
val.end = innerEndPos;
val.loc.end = innerEndLoc;
this.resetEndLocation(val, innerEndPos, innerEndLoc);
} else {
val = exprList[0];
}