diff --git a/packages/parser/tests/lib/__snapshots__/typescript.ts.snap b/packages/parser/tests/lib/__snapshots__/typescript.ts.snap index ab627ecea75..75fb08f867c 100644 --- a/packages/parser/tests/lib/__snapshots__/typescript.ts.snap +++ b/packages/parser/tests/lib/__snapshots__/typescript.ts.snap @@ -7851,68 +7851,297 @@ Object { exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` Object { - "$id": 4, + "$id": 21, "block": Object { "range": Array [ 0, - 68, + 281, ], "type": "Program", }, "childScopes": Array [ Object { - "$id": 3, + "$id": 20, "block": Object { "range": Array [ 0, - 68, + 281, ], "type": "Program", }, "childScopes": Array [ Object { - "$id": 2, + "$id": 19, "block": Object { "range": Array [ - 0, - 67, + 88, + 280, ], "type": "ClassDeclaration", }, - "childScopes": Array [], + "childScopes": Array [ + Object { + "$id": 12, + "block": Object { + "range": Array [ + 186, + 191, + ], + "type": "FunctionExpression", + }, + "childScopes": Array [], + "functionExpressionScope": false, + "isStrict": true, + "references": Array [], + "throughReferences": Array [], + "type": "function", + "upperScope": Object { + "$ref": 19, + }, + "variableMap": Object { + "arguments": Object { + "$ref": 11, + }, + }, + "variableScope": Object { + "$ref": 12, + }, + "variables": Array [ + Object { + "$id": 11, + "defs": Array [], + "eslintUsed": undefined, + "identifiers": Array [], + "name": "arguments", + "references": Array [], + "scope": Object { + "$ref": 12, + }, + }, + ], + }, + Object { + "$id": 14, + "block": Object { + "range": Array [ + 209, + 214, + ], + "type": "FunctionExpression", + }, + "childScopes": Array [], + "functionExpressionScope": false, + "isStrict": true, + "references": Array [], + "throughReferences": Array [], + "type": "function", + "upperScope": Object { + "$ref": 19, + }, + "variableMap": Object { + "arguments": Object { + "$ref": 13, + }, + }, + "variableScope": Object { + "$ref": 14, + }, + "variables": Array [ + Object { + "$id": 13, + "defs": Array [], + "eslintUsed": undefined, + "identifiers": Array [], + "name": "arguments", + "references": Array [], + "scope": Object { + "$ref": 14, + }, + }, + ], + }, + Object { + "$id": 16, + "block": Object { + "range": Array [ + 250, + 255, + ], + "type": "FunctionExpression", + }, + "childScopes": Array [], + "functionExpressionScope": false, + "isStrict": true, + "references": Array [], + "throughReferences": Array [], + "type": "function", + "upperScope": Object { + "$ref": 19, + }, + "variableMap": Object { + "arguments": Object { + "$ref": 15, + }, + }, + "variableScope": Object { + "$ref": 16, + }, + "variables": Array [ + Object { + "$id": 15, + "defs": Array [], + "eslintUsed": undefined, + "identifiers": Array [], + "name": "arguments", + "references": Array [], + "scope": Object { + "$ref": 16, + }, + }, + ], + }, + Object { + "$id": 18, + "block": Object { + "range": Array [ + 272, + 277, + ], + "type": "FunctionExpression", + }, + "childScopes": Array [], + "functionExpressionScope": false, + "isStrict": true, + "references": Array [], + "throughReferences": Array [], + "type": "function", + "upperScope": Object { + "$ref": 19, + }, + "variableMap": Object { + "arguments": Object { + "$ref": 17, + }, + }, + "variableScope": Object { + "$ref": 18, + }, + "variables": Array [ + Object { + "$id": 17, + "defs": Array [], + "eslintUsed": undefined, + "identifiers": Array [], + "name": "arguments", + "references": Array [], + "scope": Object { + "$ref": 18, + }, + }, + ], + }, + ], "functionExpressionScope": false, "isStrict": true, - "references": Array [], - "throughReferences": Array [], + "references": Array [ + Object { + "$id": 8, + "from": Object { + "$ref": 19, + }, + "identifier": Object { + "name": "computed1", + "range": Array [ + 157, + 166, + ], + "type": "Identifier", + }, + "kind": "r", + "resolved": Object { + "$ref": 0, + }, + "writeExpr": undefined, + }, + Object { + "$id": 9, + "from": Object { + "$ref": 19, + }, + "identifier": Object { + "name": "computed2", + "range": Array [ + 175, + 184, + ], + "type": "Identifier", + }, + "kind": "r", + "resolved": Object { + "$ref": 1, + }, + "writeExpr": undefined, + }, + Object { + "$id": 10, + "from": Object { + "$ref": 19, + }, + "identifier": Object { + "name": "obj", + "range": Array [ + 260, + 263, + ], + "type": "Identifier", + }, + "kind": "r", + "resolved": Object { + "$ref": 2, + }, + "writeExpr": undefined, + }, + ], + "throughReferences": Array [ + Object { + "$ref": 8, + }, + Object { + "$ref": 9, + }, + Object { + "$ref": 10, + }, + ], "type": "class", "upperScope": Object { - "$ref": 3, + "$ref": 20, }, "variableMap": Object { "Foo": Object { - "$ref": 1, + "$ref": 7, }, }, "variableScope": Object { - "$ref": 3, + "$ref": 20, }, "variables": Array [ Object { - "$id": 1, + "$id": 7, "defs": Array [ Object { "name": Object { "name": "Foo", "range": Array [ - 6, - 9, + 94, + 97, ], "type": "Identifier", }, "node": Object { "range": Array [ - 0, - 67, + 88, + 280, ], "type": "ClassDeclaration", }, @@ -7925,8 +8154,8 @@ Object { Object { "name": "Foo", "range": Array [ - 6, - 9, + 94, + 97, ], "type": "Identifier", }, @@ -7934,7 +8163,7 @@ Object { "name": "Foo", "references": Array [], "scope": Object { - "$ref": 2, + "$ref": 19, }, }, ], @@ -7942,19 +8171,104 @@ Object { ], "functionExpressionScope": false, "isStrict": true, - "references": Array [], + "references": Array [ + Object { + "$id": 4, + "from": Object { + "$ref": 20, + }, + "identifier": Object { + "name": "computed1", + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + }, + "kind": "w", + "resolved": Object { + "$ref": 0, + }, + "writeExpr": Object { + "range": Array [ + 18, + 24, + ], + "type": "Literal", + }, + }, + Object { + "$id": 5, + "from": Object { + "$ref": 20, + }, + "identifier": Object { + "name": "computed2", + "range": Array [ + 32, + 41, + ], + "type": "Identifier", + }, + "kind": "w", + "resolved": Object { + "$ref": 1, + }, + "writeExpr": Object { + "range": Array [ + 44, + 50, + ], + "type": "Literal", + }, + }, + Object { + "$id": 6, + "from": Object { + "$ref": 20, + }, + "identifier": Object { + "name": "obj", + "range": Array [ + 58, + 61, + ], + "type": "Identifier", + }, + "kind": "w", + "resolved": Object { + "$ref": 2, + }, + "writeExpr": Object { + "range": Array [ + 64, + 86, + ], + "type": "ObjectExpression", + }, + }, + ], "throughReferences": Array [], "type": "module", "upperScope": Object { - "$ref": 4, + "$ref": 21, }, "variableMap": Object { "Foo": Object { + "$ref": 3, + }, + "computed1": Object { "$ref": 0, }, + "computed2": Object { + "$ref": 1, + }, + "obj": Object { + "$ref": 2, + }, }, "variableScope": Object { - "$ref": 3, + "$ref": 20, }, "variables": Array [ Object { @@ -7962,17 +8276,176 @@ Object { "defs": Array [ Object { "name": Object { - "name": "Foo", + "name": "computed1", "range": Array [ 6, - 9, + 15, ], "type": "Identifier", }, "node": Object { + "range": Array [ + 6, + 24, + ], + "type": "VariableDeclarator", + }, + "parent": Object { "range": Array [ 0, - 67, + 25, + ], + "type": "VariableDeclaration", + }, + "type": "Variable", + }, + ], + "eslintUsed": undefined, + "identifiers": Array [ + Object { + "name": "computed1", + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + }, + ], + "name": "computed1", + "references": Array [ + Object { + "$ref": 4, + }, + Object { + "$ref": 8, + }, + ], + "scope": Object { + "$ref": 20, + }, + }, + Object { + "$id": 1, + "defs": Array [ + Object { + "name": Object { + "name": "computed2", + "range": Array [ + 32, + 41, + ], + "type": "Identifier", + }, + "node": Object { + "range": Array [ + 32, + 50, + ], + "type": "VariableDeclarator", + }, + "parent": Object { + "range": Array [ + 26, + 51, + ], + "type": "VariableDeclaration", + }, + "type": "Variable", + }, + ], + "eslintUsed": undefined, + "identifiers": Array [ + Object { + "name": "computed2", + "range": Array [ + 32, + 41, + ], + "type": "Identifier", + }, + ], + "name": "computed2", + "references": Array [ + Object { + "$ref": 5, + }, + Object { + "$ref": 9, + }, + ], + "scope": Object { + "$ref": 20, + }, + }, + Object { + "$id": 2, + "defs": Array [ + Object { + "name": Object { + "name": "obj", + "range": Array [ + 58, + 61, + ], + "type": "Identifier", + }, + "node": Object { + "range": Array [ + 58, + 86, + ], + "type": "VariableDeclarator", + }, + "parent": Object { + "range": Array [ + 52, + 87, + ], + "type": "VariableDeclaration", + }, + "type": "Variable", + }, + ], + "eslintUsed": undefined, + "identifiers": Array [ + Object { + "name": "obj", + "range": Array [ + 58, + 61, + ], + "type": "Identifier", + }, + ], + "name": "obj", + "references": Array [ + Object { + "$ref": 6, + }, + Object { + "$ref": 10, + }, + ], + "scope": Object { + "$ref": 20, + }, + }, + Object { + "$id": 3, + "defs": Array [ + Object { + "name": Object { + "name": "Foo", + "range": Array [ + 94, + 97, + ], + "type": "Identifier", + }, + "node": Object { + "range": Array [ + 88, + 280, ], "type": "ClassDeclaration", }, @@ -7985,8 +8458,8 @@ Object { Object { "name": "Foo", "range": Array [ - 6, - 9, + 94, + 97, ], "type": "Identifier", }, @@ -7994,7 +8467,7 @@ Object { "name": "Foo", "references": Array [], "scope": Object { - "$ref": 3, + "$ref": 20, }, }, ], @@ -8008,7 +8481,7 @@ Object { "upperScope": null, "variableMap": Object {}, "variableScope": Object { - "$ref": 4, + "$ref": 21, }, "variables": Array [], } diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts index 2fe152d3d41..e880bc5e81c 100644 --- a/packages/shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts @@ -1,5 +1,17 @@ +const computed1 = "buzz"; +const computed2 = "bazz"; +const obj = { + member: "member" +}; class Foo { foo?(); bar?(): string; private baz?(): string; + [computed1]?(); + [computed2]?() {}; + [1]?(); + [2]?() {}; + ["literal1"]?(); + ["literal2"]?() {}; + [obj.member]?() {}; } diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 598178158b0..5d9986bd69b 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1044,7 +1044,8 @@ export class Converter { } if ( - result.key.type === AST_NODE_TYPES.Identifier && + (result.key.type === AST_NODE_TYPES.Identifier || + result.key.type === AST_NODE_TYPES.MemberExpression) && node.questionToken ) { result.key.optional = true; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/typescript.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/typescript.ts.snap index 44425c5e4a5..4d1b84a76be 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/typescript.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/typescript.ts.snap @@ -21144,418 +21144,2550 @@ exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "optional": true, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 6, + "line": 1, }, }, + "name": "computed1", "range": Array [ - 14, - 21, + 6, + 15, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 21, - ], - "type": "FunctionExpression", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "kind": "method", + "init": Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ + 18, 24, - 39, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 28, - 39, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - "type": "FunctionExpression", + "raw": "\\"buzz\\"", + "type": "Literal", + "value": "buzz", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, }, }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, + "range": Array [ + 6, + 24, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, }, - "name": "baz", - "optional": true, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", }, - "kind": "method", + "name": "computed2", + "range": Array [ + 32, + 41, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 25, - "line": 4, + "column": 24, + "line": 2, }, "start": Object { - "column": 2, - "line": 4, + "column": 18, + "line": 2, }, }, "range": Array [ - 42, - 65, + 44, + 50, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, + "raw": "\\"bazz\\"", + "type": "Literal", + "value": "bazz", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 32, + 50, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 26, + 51, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, }, - "params": Array [], - "range": Array [ - 54, - 65, - ], - "returnType": Object { + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "obj", + "range": Array [ + 58, + 61, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "member", + "range": Array [ + 68, + 74, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 4, }, "start": Object { - "column": 16, + "column": 2, "line": 4, }, }, + "method": false, "range": Array [ - 56, - 64, + 68, + 84, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 4, }, "start": Object { - "column": 18, + "column": 10, "line": 4, }, }, "range": Array [ - 58, - 64, + 76, + 84, ], - "type": "TSStringKeyword", + "raw": "\\"member\\"", + "type": "Literal", + "value": "member", }, }, - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, + ], + "range": Array [ + 64, + 86, + ], + "type": "ObjectExpression", }, - "start": Object { - "column": 10, - "line": 1, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "range": Array [ + 58, + 86, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 3, }, - "range": Array [ - 10, - 67, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "range": Array [ + 52, + 87, + ], + "type": "VariableDeclaration", + }, + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "name": "foo", + "optional": true, + "range": Array [ + 102, + 105, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 102, + 109, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "params": Array [], + "range": Array [ + 106, + 109, + ], + "type": "FunctionExpression", + }, }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 112, + 115, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 112, + 127, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 6, + "line": 8, + }, + }, + "params": Array [], + "range": Array [ + 116, + 127, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 118, + 126, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "range": Array [ + 120, + 126, + ], + "type": "TSStringKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 10, + "line": 9, + }, + }, + "name": "baz", + "optional": true, + "range": Array [ + 138, + 141, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 9, + }, + }, + "range": Array [ + 130, + 153, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 14, + "line": 9, + }, + }, + "params": Array [], + "range": Array [ + 142, + 153, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "range": Array [ + 144, + 152, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 18, + "line": 9, + }, + }, + "range": Array [ + 146, + 152, + ], + "type": "TSStringKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 10, + }, + "start": Object { + "column": 3, + "line": 10, + }, + }, + "name": "computed1", + "optional": true, + "range": Array [ + 157, + 166, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 17, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 10, + }, + }, + "range": Array [ + 156, + 171, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 10, + }, + "start": Object { + "column": 14, + "line": 10, + }, + }, + "params": Array [], + "range": Array [ + 168, + 171, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 11, + }, + "start": Object { + "column": 3, + "line": 11, + }, + }, + "name": "computed2", + "optional": true, + "range": Array [ + 175, + 184, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 2, + "line": 11, + }, + }, + "range": Array [ + 174, + 191, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 17, + "line": 11, + }, + }, + "range": Array [ + 189, + 191, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 14, + "line": 11, + }, + }, + "params": Array [], + "range": Array [ + 186, + 191, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 12, + }, + "start": Object { + "column": 3, + "line": 12, + }, + }, + "range": Array [ + 196, + 197, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 9, + "line": 12, + }, + "start": Object { + "column": 2, + "line": 12, + }, + }, + "range": Array [ + 195, + 202, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 12, + }, + "start": Object { + "column": 6, + "line": 12, + }, + }, + "params": Array [], + "range": Array [ + 199, + 202, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 13, + }, + "start": Object { + "column": 3, + "line": 13, + }, + }, + "range": Array [ + 206, + 207, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 2, + "line": 13, + }, + }, + "range": Array [ + 205, + 214, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "range": Array [ + 212, + 214, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 6, + "line": 13, + }, + }, + "params": Array [], + "range": Array [ + 209, + 214, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 14, + }, + "start": Object { + "column": 3, + "line": 14, + }, + }, + "range": Array [ + 219, + 229, + ], + "raw": "\\"literal1\\"", + "type": "Literal", + "value": "literal1", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 18, + "line": 14, + }, + "start": Object { + "column": 2, + "line": 14, + }, + }, + "range": Array [ + 218, + 234, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 18, + "line": 14, + }, + "start": Object { + "column": 15, + "line": 14, + }, + }, + "params": Array [], + "range": Array [ + 231, + 234, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 15, + }, + "start": Object { + "column": 3, + "line": 15, + }, + }, + "range": Array [ + 238, + 248, + ], + "raw": "\\"literal2\\"", + "type": "Literal", + "value": "literal2", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 15, + }, + "start": Object { + "column": 2, + "line": 15, + }, + }, + "range": Array [ + 237, + 255, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 15, + }, + "start": Object { + "column": 18, + "line": 15, + }, + }, + "range": Array [ + 253, + 255, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 15, + }, + "start": Object { + "column": 15, + "line": 15, + }, + }, + "params": Array [], + "range": Array [ + 250, + 255, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 16, + }, + "start": Object { + "column": 3, + "line": 16, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 16, + }, + "start": Object { + "column": 3, + "line": 16, + }, + }, + "name": "obj", + "range": Array [ + 260, + 263, + ], + "type": "Identifier", + }, + "optional": true, + "property": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 16, + }, + "start": Object { + "column": 7, + "line": 16, + }, + }, + "name": "member", + "range": Array [ + 264, + 270, + ], + "type": "Identifier", + }, + "range": Array [ + 260, + 270, + ], + "type": "MemberExpression", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 16, + }, + "start": Object { + "column": 2, + "line": 16, + }, + }, + "range": Array [ + 259, + 277, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 16, + }, + "start": Object { + "column": 18, + "line": 16, + }, + }, + "range": Array [ + 275, + 277, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 16, + }, + "start": Object { + "column": 15, + "line": 16, + }, + }, + "params": Array [], + "range": Array [ + 272, + 277, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 17, + }, + "start": Object { + "column": 10, + "line": 6, + }, + }, + "range": Array [ + 98, + 280, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "name": "Foo", + "range": Array [ + 94, + 97, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 17, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 88, + 280, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 18, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 281, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + "value": "computed1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "String", + "value": "\\"buzz\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 26, + 31, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 32, + 41, + ], + "type": "Identifier", + "value": "computed2", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 44, + 50, + ], + "type": "String", + "value": "\\"bazz\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 52, + 57, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 58, + 61, + ], + "type": "Identifier", + "value": "obj", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 68, + 74, + ], + "type": "Identifier", + "value": "member", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 76, + 84, + ], + "type": "String", + "value": "\\"member\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 88, + 93, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "range": Array [ + 94, + 97, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 6, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 102, + 105, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, + }, + }, + "range": Array [ + 105, + 106, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 7, + "line": 7, + }, + }, + "range": Array [ + 107, + 108, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 112, + 115, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 8, + }, + "start": Object { + "column": 5, + "line": 8, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 6, + "line": 8, + }, + }, + "range": Array [ + 116, + 117, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "range": Array [ + 117, + 118, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 118, + 119, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "range": Array [ + 120, + 126, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 16, + "line": 8, + }, + }, + "range": Array [ + 126, + 127, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 9, + }, + }, + "range": Array [ + 130, + 137, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 10, + "line": 9, + }, + }, + "range": Array [ + 138, + 141, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 9, + }, + "start": Object { + "column": 13, + "line": 9, + }, + }, + "range": Array [ + 141, + 142, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 9, + }, + "start": Object { + "column": 14, + "line": 9, + }, + }, + "range": Array [ + 142, + 143, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 15, + "line": 9, + }, + }, + "range": Array [ + 143, + 144, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "range": Array [ + 144, + 145, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 18, + "line": 9, + }, + }, + "range": Array [ + 146, + 152, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 24, + "line": 9, + }, + }, + "range": Array [ + 152, + 153, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 10, + }, + }, + "range": Array [ + 156, + 157, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 10, + }, + "start": Object { + "column": 3, + "line": 10, + }, + }, + "range": Array [ + 157, + 166, + ], + "type": "Identifier", + "value": "computed1", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 10, + }, + }, + "range": Array [ + 166, + 167, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 10, + }, + "start": Object { + "column": 13, + "line": 10, + }, + }, + "range": Array [ + 167, + 168, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 10, + }, + "start": Object { + "column": 14, + "line": 10, + }, + }, + "range": Array [ + 168, + 169, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 10, + }, + }, + "range": Array [ + 169, + 170, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 10, + }, + "start": Object { + "column": 16, + "line": 10, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 11, + }, + "start": Object { + "column": 2, + "line": 11, + }, + }, + "range": Array [ + 174, + 175, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 11, + }, + "start": Object { + "column": 3, + "line": 11, + }, + }, + "range": Array [ + 175, + 184, + ], + "type": "Identifier", + "value": "computed2", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 11, + }, + "start": Object { + "column": 12, + "line": 11, + }, + }, + "range": Array [ + 184, + 185, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 11, + }, + "start": Object { + "column": 13, + "line": 11, + }, + }, + "range": Array [ + 185, + 186, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 11, + }, + "start": Object { + "column": 14, + "line": 11, + }, + }, + "range": Array [ + 186, + 187, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 11, + }, + "start": Object { + "column": 15, + "line": 11, + }, + }, + "range": Array [ + 187, + 188, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 11, + }, + "start": Object { + "column": 17, + "line": 11, + }, + }, + "range": Array [ + 189, + 190, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 190, + 191, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 11, + }, + "start": Object { + "column": 19, + "line": 11, + }, + }, + "range": Array [ + 191, + 192, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 12, + }, + "start": Object { + "column": 2, + "line": 12, + }, + }, + "range": Array [ + 195, + 196, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 12, + }, + "start": Object { + "column": 3, + "line": 12, + }, + }, + "range": Array [ + 196, + 197, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "range": Array [ + 197, + 198, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 12, + }, + "start": Object { + "column": 5, + "line": 12, + }, + }, + "range": Array [ + 198, + 199, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 12, + }, + "start": Object { + "column": 6, + "line": 12, + }, + }, + "range": Array [ + 199, + 200, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 12, + }, + "start": Object { + "column": 7, + "line": 12, + }, + }, + "range": Array [ + 200, + 201, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 12, + }, + "start": Object { + "column": 8, + "line": 12, + }, + }, + "range": Array [ + 201, + 202, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 13, + }, + "start": Object { + "column": 2, + "line": 13, + }, + }, + "range": Array [ + 205, + 206, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 13, + }, + "start": Object { + "column": 3, + "line": 13, + }, + }, + "range": Array [ + 206, + 207, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, }, + "range": Array [ + 207, + 208, + ], + "type": "Punctuator", + "value": "]", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 6, + "line": 13, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 13, }, }, "range": Array [ - 0, - 67, + 208, + 209, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, + "type": "Punctuator", + "value": "?", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 13, + }, + "start": Object { + "column": 6, + "line": 13, + }, + }, + "range": Array [ + 209, + 210, + ], + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 68, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 13, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 13, }, }, "range": Array [ - 0, - 5, + 210, + 211, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 13, }, "start": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 13, }, }, "range": Array [ - 6, - 9, + 212, + 213, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 13, }, "start": Object { "column": 10, - "line": 1, + "line": 13, }, }, "range": Array [ - 10, - 11, + 213, + 214, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 13, + }, + "start": Object { + "column": 11, + "line": 13, + }, + }, + "range": Array [ + 214, + 215, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 14, }, "start": Object { "column": 2, - "line": 2, + "line": 14, }, }, "range": Array [ - 14, - 17, + 218, + 219, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 13, + "line": 14, }, "start": Object { - "column": 5, - "line": 2, + "column": 3, + "line": 14, }, }, "range": Array [ - 17, - 18, + 219, + 229, + ], + "type": "String", + "value": "\\"literal1\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 14, + }, + "start": Object { + "column": 13, + "line": 14, + }, + }, + "range": Array [ + 229, + 230, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 14, + }, + "start": Object { + "column": 14, + "line": 14, + }, + }, + "range": Array [ + 230, + 231, ], "type": "Punctuator", "value": "?", @@ -21563,323 +23695,413 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 14, }, "start": Object { - "column": 6, - "line": 2, + "column": 15, + "line": 14, + }, + }, + "range": Array [ + 231, + 232, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 14, + }, + "start": Object { + "column": 16, + "line": 14, + }, + }, + "range": Array [ + 232, + 233, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 14, + }, + "start": Object { + "column": 17, + "line": 14, + }, + }, + "range": Array [ + 233, + 234, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 2, + "line": 15, + }, + }, + "range": Array [ + 237, + 238, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 15, + }, + "start": Object { + "column": 3, + "line": 15, }, }, "range": Array [ - 18, - 19, + 238, + 248, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"literal2\\"", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 14, + "line": 15, }, "start": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 15, }, }, "range": Array [ - 19, - 20, + 248, + 249, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 15, + "line": 15, }, "start": Object { - "column": 8, - "line": 2, + "column": 14, + "line": 15, }, }, "range": Array [ - 20, - 21, + 249, + 250, ], "type": "Punctuator", - "value": ";", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 16, + "line": 15, }, "start": Object { - "column": 2, - "line": 3, + "column": 15, + "line": 15, }, }, "range": Array [ - 24, - 27, + 250, + 251, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 17, + "line": 15, }, "start": Object { - "column": 5, - "line": 3, + "column": 16, + "line": 15, }, }, "range": Array [ - 27, - 28, + 251, + 252, ], "type": "Punctuator", - "value": "?", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 19, + "line": 15, }, "start": Object { - "column": 6, - "line": 3, + "column": 18, + "line": 15, }, }, "range": Array [ - 28, - 29, + 253, + 254, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 20, + "line": 15, }, "start": Object { - "column": 7, - "line": 3, + "column": 19, + "line": 15, }, }, "range": Array [ - 29, - 30, + 254, + 255, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 21, + "line": 15, }, "start": Object { - "column": 8, - "line": 3, + "column": 20, + "line": 15, }, }, "range": Array [ - 30, - 31, + 255, + 256, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 3, + "line": 16, }, "start": Object { - "column": 10, - "line": 3, + "column": 2, + "line": 16, }, }, "range": Array [ - 32, - 38, + 259, + 260, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 6, + "line": 16, }, "start": Object { - "column": 16, - "line": 3, + "column": 3, + "line": 16, }, }, "range": Array [ - 38, - 39, + 260, + 263, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 7, + "line": 16, }, "start": Object { - "column": 2, - "line": 4, + "column": 6, + "line": 16, }, }, "range": Array [ - 42, - 49, + 263, + 264, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 4, + "line": 16, }, "start": Object { - "column": 10, - "line": 4, + "column": 7, + "line": 16, }, }, "range": Array [ - 50, - 53, + 264, + 270, ], "type": "Identifier", - "value": "baz", + "value": "member", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 4, + "line": 16, }, "start": Object { "column": 13, - "line": 4, + "line": 16, }, }, "range": Array [ - 53, - 54, + 270, + 271, ], "type": "Punctuator", - "value": "?", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 4, + "line": 16, }, "start": Object { "column": 14, - "line": 4, + "line": 16, }, }, "range": Array [ - 54, - 55, + 271, + 272, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 4, + "line": 16, }, "start": Object { "column": 15, - "line": 4, + "line": 16, }, }, "range": Array [ - 55, - 56, + 272, + 273, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 4, + "line": 16, }, "start": Object { "column": 16, - "line": 4, + "line": 16, }, }, "range": Array [ - 56, - 57, + 273, + 274, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 19, + "line": 16, }, "start": Object { "column": 18, - "line": 4, + "line": 16, }, }, "range": Array [ - 58, - 64, + 275, + 276, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 4, + "column": 20, + "line": 16, }, "start": Object { - "column": 24, - "line": 4, + "column": 19, + "line": 16, }, }, "range": Array [ - 64, - 65, + 276, + 277, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 16, + }, + "start": Object { + "column": 20, + "line": 16, + }, + }, + "range": Array [ + 277, + 278, ], "type": "Punctuator", "value": ";", @@ -21888,16 +24110,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 17, }, "start": Object { "column": 0, - "line": 5, + "line": 17, }, }, "range": Array [ - 66, - 67, + 279, + 280, ], "type": "Punctuator", "value": "}",