From 033ae7d22f7283e86191b4bcad359035b08ef8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Tue, 18 Oct 2022 14:06:03 -0400 Subject: [PATCH] adapt to startNodeAt usage --- packages/babel-parser/src/parser/expression.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.ts b/packages/babel-parser/src/parser/expression.ts index 45583f02c035..3f6ea34b224a 100644 --- a/packages/babel-parser/src/parser/expression.ts +++ b/packages/babel-parser/src/parser/expression.ts @@ -3146,10 +3146,7 @@ export default abstract class ExpressionParser extends LValParser { this.unexpected(null, tt.braceL); } // start program node immediately after `{` - const program = this.startNodeAt( - this.state.end, - this.state.endLoc, - ); + const program = this.startNodeAt(this.state.endLoc); this.next(); // eat `{` const revertScopes = this.initializeScopes(/** inModule */ true);