Skip to content

Change the parser to allow the RegExp d flag. #13393

@ota-meshi

Description

@ota-meshi

💻

  • Would you like to work on this feature?

What problem are you trying to solve?

RegExp literals can now use the d flag, but the d flag causes a parsing error.

https://github.com/tc39/proposals/blob/master/finished-proposals.md
tc39/proposals@f0adbe1
https://github.com/tc39/proposal-regexp-match-indices
tc39/ecma262#1713

Describe the solution you'd like

Change the parser so that the d flag of the RegExp literal does not cause a parsing error.

I'm not familiar with it, but I might just add the flag to the next line.
https://github.com/babel/babel/blob/main/packages/babel-parser/src/tokenizer/index.js#L24

Describe alternatives you've considered

I don't think there is an alternative.

Documentation, Adoption, Migration Strategy

No response

Metadata

Metadata

Assignees

Labels

outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions