{ "type": "Program", "statements": [ { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ObjectPattern", "properties": [ { "type": "Property", "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 17 } } }, "value": { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 17 } } }, "right": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 21 } } }, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 21 } } }, "kind": "init", "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 21 } } }, { "type": "Property", "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 24 } } }, "value": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 24 } } }, "kind": "init", "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 24 } } }, { "type": "Property", "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "name": "d", "decorators": [], "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 27 } } }, "value": { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "d", "decorators": [], "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 27 } } }, "right": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 29 } } }, "right": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 31 }, "end": { "line": 17, "column": 32 } } }, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 32 } } }, "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 32 } } }, "kind": "init", "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 32 } } } ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 33 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 17, "column": 34 }, "end": { "line": 17, "column": 36 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 36 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 36 } } }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "bar", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 16 } } }, { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 18 } } }, { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 20 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 22 } } }, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 22 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 25 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 25 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 25 } } }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foobar", "decorators": [], "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 16 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "AssignmentPattern", "left": { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 5 } } } ], "loc": { "start": { "line": 20, "column": 3 }, "end": { "line": 20, "column": 6 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 20, "column": 8 } } }, "loc": { "start": { "line": 20, "column": 3 }, "end": { "line": 20, "column": 8 } } }, { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 5 } } } ], "loc": { "start": { "line": 21, "column": 3 }, "end": { "line": 21, "column": 6 } } }, { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 22, "column": 3 }, "end": { "line": 22, "column": 4 } } }, { "type": "ObjectPattern", "properties": [], "loc": { "start": { "line": 23, "column": 3 }, "end": { "line": 23, "column": 5 } } }, { "type": "ArrayPattern", "elements": [], "loc": { "start": { "line": 24, "column": 3 }, "end": { "line": 24, "column": 5 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 25, "column": 2 }, "end": { "line": 25, "column": 4 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 25, "column": 4 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 25, "column": 4 } } }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "test1", "decorators": [], "loc": { "start": { "line": 26, "column": 10 }, "end": { "line": 26, "column": 15 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "RestElement", "argument": { "type": "Identifier", "name": "rest", "decorators": [], "loc": { "start": { "line": 26, "column": 19 }, "end": { "line": 26, "column": 23 } } }, "loc": { "start": { "line": 26, "column": 16 }, "end": { "line": 26, "column": 23 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 26, "column": 24 }, "end": { "line": 26, "column": 26 } } }, "loc": { "start": { "line": 26, "column": 1 }, "end": { "line": 26, "column": 26 } } }, "loc": { "start": { "line": 26, "column": 1 }, "end": { "line": 26, "column": 26 } } }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "test2", "decorators": [], "loc": { "start": { "line": 27, "column": 10 }, "end": { "line": 27, "column": 15 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "RestElement", "argument": { "type": "ArrayPattern", "elements": [ { "type": "RestElement", "argument": { "type": "ArrayPattern", "elements": [ { "type": "RestElement", "argument": { "type": "Identifier", "name": "rest", "decorators": [], "loc": { "start": { "line": 27, "column": 27 }, "end": { "line": 27, "column": 31 } } }, "loc": { "start": { "line": 27, "column": 24 }, "end": { "line": 27, "column": 31 } } } ], "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 32 } } }, "loc": { "start": { "line": 27, "column": 20 }, "end": { "line": 27, "column": 32 } } } ], "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 33 } } }, "loc": { "start": { "line": 27, "column": 16 }, "end": { "line": 27, "column": 33 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 27, "column": 34 }, "end": { "line": 27, "column": 36 } } }, "loc": { "start": { "line": 27, "column": 1 }, "end": { "line": 27, "column": 36 } } }, "loc": { "start": { "line": 27, "column": 1 }, "end": { "line": 27, "column": 36 } } }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "test3", "decorators": [], "loc": { "start": { "line": 28, "column": 10 }, "end": { "line": 28, "column": 15 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 28, "column": 17 }, "end": { "line": 28, "column": 18 } } }, { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 28, "column": 20 }, "end": { "line": 28, "column": 21 } } } ], "loc": { "start": { "line": 28, "column": 19 }, "end": { "line": 28, "column": 22 } } } ], "loc": { "start": { "line": 28, "column": 16 }, "end": { "line": 28, "column": 23 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 28, "column": 24 }, "end": { "line": 28, "column": 26 } } }, "loc": { "start": { "line": 28, "column": 1 }, "end": { "line": 28, "column": 26 } } }, "loc": { "start": { "line": 28, "column": 1 }, "end": { "line": 28, "column": 26 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 28, "column": 26 } } }