{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "a", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "body": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": false, "range": [ 17, 31 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 31 } } }, "range": [ 14, 31 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "a", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ":", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Keyword", "value": "function", "range": [ 17, 25 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "f", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "{", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "errors": [ { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block" } ] }