* chore: update espree test on nullish coalescing * feat: add optional chaining support * fix: adapt to estree AST shape * chore: update lockfile * add estree optional-chaining test fixtures * address review comments * chore: simplify smoke test * export * support Co-authored-by: Brian Ng <bng412@gmail.com>
41 lines
1.4 KiB
JSON
41 lines
1.4 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
|
"callee": {
|
|
"type": "ChainExpression",
|
|
"start":1,"end":8,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":8}},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"start":1,"end":8,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":8}},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"start":1,"end":4,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":4},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"optional": true,
|
|
"arguments": []
|
|
},
|
|
"extra": {
|
|
"parenthesized": true,
|
|
"parenStart": 0
|
|
}
|
|
},
|
|
"arguments": [],
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
} |