Add support for d flag of regex literals in parser (#13396)

This commit is contained in:
Yosuke Ota
2021-05-31 21:34:53 +09:00
committed by GitHub
parent 813f2a3cce
commit 0b29b5c2c0
3 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1 @@
/./d;

View File

@@ -0,0 +1,26 @@
{
"type": "File",
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
"program": {
"type": "Program",
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
"expression": {
"type": "RegExpLiteral",
"start":0,"end":4,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":4}},
"extra": {
"raw": "/./d"
},
"pattern": ".",
"flags": "d"
}
}
],
"directives": []
}
}