Allows the interface to be used as an Identifier for flow plugin (#12254)
This commit is contained in:
1
packages/babel-parser/test/fixtures/flow/interfaces-as-identifier/class-declaration/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/flow/interfaces-as-identifier/class-declaration/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class interface {}
|
||||
31
packages/babel-parser/test/fixtures/flow/interfaces-as-identifier/class-declaration/output.json
vendored
Normal file
31
packages/babel-parser/test/fixtures/flow/interfaces-as-identifier/class-declaration/output.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},
|
||||
"errors": [
|
||||
"SyntaxError: Unexpected reserved word 'interface' (1:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},
|
||||
"sourceType": "module",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":6,"end":15,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":15},"identifierName":"interface"},
|
||||
"name": "interface"
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start":16,"end":18,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":18}},
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user