Allows the interface to be used as an Identifier for flow plugin (#12254)

This commit is contained in:
Sosuke Suzuki
2020-10-26 22:50:57 +09:00
committed by GitHub
parent a967910b8b
commit f5bd9f2013
27 changed files with 531 additions and 11 deletions

View File

@@ -0,0 +1 @@
const interface = "foo";

View File

@@ -0,0 +1,41 @@
{
"type": "File",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"errors": [
"SyntaxError: Unexpected reserved word 'interface' (1:6)"
],
"program": {
"type": "Program",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"declarations": [
{
"type": "VariableDeclarator",
"start":6,"end":23,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":23}},
"id": {
"type": "Identifier",
"start":6,"end":15,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":15},"identifierName":"interface"},
"name": "interface"
},
"init": {
"type": "StringLiteral",
"start":18,"end":23,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":23}},
"extra": {
"rawValue": "foo",
"raw": "\"foo\""
},
"value": "foo"
}
}
],
"kind": "const"
}
],
"directives": []
}
}