Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Feb 1, 2023
1 parent 5946ee8 commit a5a9380
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
Expand Up @@ -4,3 +4,6 @@
{
using \u0061wait = h();
}
{
using x, await = h();
}
@@ -1,13 +1,14 @@
{
"type": "File",
"start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":54}},
"start":0,"end":82,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":82}},
"errors": [
"SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (2:8)",
"SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (5:8)"
"SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (5:8)",
"SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (8:11)"
],
"program": {
"type": "Program",
"start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":54}},
"start":0,"end":82,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":82}},
"sourceType": "script",
"interpreter": null,
"body": [
Expand Down Expand Up @@ -76,6 +77,49 @@
}
],
"directives": []
},
{
"type": "BlockStatement",
"start":55,"end":82,"loc":{"start":{"line":7,"column":0,"index":55},"end":{"line":9,"column":1,"index":82}},
"body": [
{
"type": "VariableDeclaration",
"start":59,"end":80,"loc":{"start":{"line":8,"column":2,"index":59},"end":{"line":8,"column":23,"index":80}},
"declarations": [
{
"type": "VariableDeclarator",
"start":65,"end":66,"loc":{"start":{"line":8,"column":8,"index":65},"end":{"line":8,"column":9,"index":66}},
"id": {
"type": "Identifier",
"start":65,"end":66,"loc":{"start":{"line":8,"column":8,"index":65},"end":{"line":8,"column":9,"index":66},"identifierName":"x"},
"name": "x"
},
"init": null
},
{
"type": "VariableDeclarator",
"start":68,"end":79,"loc":{"start":{"line":8,"column":11,"index":68},"end":{"line":8,"column":22,"index":79}},
"id": {
"type": "Identifier",
"start":68,"end":73,"loc":{"start":{"line":8,"column":11,"index":68},"end":{"line":8,"column":16,"index":73},"identifierName":"await"},
"name": "await"
},
"init": {
"type": "CallExpression",
"start":76,"end":79,"loc":{"start":{"line":8,"column":19,"index":76},"end":{"line":8,"column":22,"index":79}},
"callee": {
"type": "Identifier",
"start":76,"end":77,"loc":{"start":{"line":8,"column":19,"index":76},"end":{"line":8,"column":20,"index":77},"identifierName":"h"},
"name": "h"
},
"arguments": []
}
}
],
"kind": "using"
}
],
"directives": []
}
],
"directives": []
Expand Down

0 comments on commit a5a9380

Please sign in to comment.