Skip to content

Commit

Permalink
remove
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed May 13, 2024
1 parent 9c77558 commit 49c0c91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/babel-parser/src/parser/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1730,13 +1730,12 @@ export default abstract class ExpressionParser extends LValParser {
pattern: string;
flags: N.RegExpLiteral["flags"];
}) {
const node = this.parseLiteral<N.RegExpLiteral>(
value.value,
"RegExpLiteral",
);
const node = this.startNode<N.RegExpLiteral>();
this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
node.pattern = value.pattern;
node.flags = value.flags;
return node;
this.next();
return this.finishNode(node, "RegExpLiteral");
}

parseBooleanLiteral(value: boolean) {
Expand Down

0 comments on commit 49c0c91

Please sign in to comment.