Skip to content

Commit

Permalink
Use resetEndLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Sep 4, 2021
1 parent e8e3abb commit 6f2ae6c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/babel-parser/src/parser/expression.js
Expand Up @@ -1735,9 +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;
if (this.options.ranges) val.range[1] = innerEndPos;
this.resetEndLocation(val, innerEndPos, innerEndLoc);
} else {
val = exprList[0];
}
Expand Down

0 comments on commit 6f2ae6c

Please sign in to comment.