Recover from "missing semicolon" errors (#12437)
* Recover from "missing semicolon" errors * Update other tests * Fix flow * Fix windows test * Add back deleted test
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"plugins": ["functionSent"],
|
||||
"throws": "Unexpected token, expected \";\" (2:18)"
|
||||
"plugins": ["functionSent"]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Missing semicolon (2:17)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":10,"end":13,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":13},"identifierName":"foo"},
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": true,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":16,"end":40,"loc":{"start":{"line":1,"column":16},"end":{"line":3,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":20,"end":35,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":17}},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start":20,"end":35,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":17}},
|
||||
"callee": {
|
||||
"type": "MetaProperty",
|
||||
"start":20,"end":33,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":15}},
|
||||
"meta": {
|
||||
"type": "Identifier",
|
||||
"start":20,"end":28,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":10},"identifierName":"function"},
|
||||
"name": "function"
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":29,"end":33,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":15},"identifierName":"sent"},
|
||||
"name": "sent"
|
||||
}
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "BlockStatement",
|
||||
"start":36,"end":38,"loc":{"start":{"line":2,"column":18},"end":{"line":2,"column":20}},
|
||||
"body": [],
|
||||
"directives": []
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user