diff --git a/.prettierignore b/.prettierignore index 76f70f7201b5..0a01355bec07 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ **/tests/fixtures/**/* **/dist **/coverage +**/typescript-eslint-shared-fixtures # Temp ignore typescript-eslint-parser -**/typescript-eslint-parser \ No newline at end of file +**/typescript-eslint-parser diff --git a/lerna.json b/lerna.json index 352f7710b8b9..a3794ba26608 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,6 @@ { "version": "0.0.0", "npmClient": "yarn", - "useWorkspaces": true + "useWorkspaces": true, + "stream": true } diff --git a/package.json b/package.json index 54aa6f77241f..4f4ae46296d3 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "postinstall": "lerna bootstrap", + "postinstall": "lerna bootstrap && lerna link", "test": "lerna run test", "build": "lerna run build", "clean": "lerna run clean", @@ -46,12 +46,12 @@ "@commitlint/config-conventional": "^7.1.2", "@commitlint/travis-cli": "^7.1.2", "@types/babel-code-frame": "^6.20.1", + "@types/glob": "^7.1.1", "@types/jest": "^23.3.9", "@types/lodash.isplainobject": "^4.0.4", "@types/lodash.unescape": "^4.0.4", "@types/node": "^10.12.2", "@types/semver": "^5.5.0", - "@types/shelljs": "^0.8.0", "cz-conventional-changelog": "2.1.0", "eslint": "^4.19.1", "glob": "7.1.2", @@ -61,7 +61,6 @@ "lint-staged": "7.3.0", "lodash.isplainobject": "4.0.6", "prettier": "^1.14.3", - "shelljs": "0.8.2", "ts-jest": "^23.10.4", "typescript": "~3.2.1" } diff --git a/packages/typescript-eslint-parser/package.json b/packages/typescript-eslint-parser/package.json index 3846710b364e..8f0d8003a4d4 100644 --- a/packages/typescript-eslint-parser/package.json +++ b/packages/typescript-eslint-parser/package.json @@ -41,6 +41,9 @@ "eslint-visitor-keys": "^1.0.0", "typescript-estree": "18.0.0" }, + "devDependencies": { + "@typescript-eslint/shared-fixtures": "*" + }, "jest": { "testEnvironment": "node", "testRegex": "tests/lib/.+\\.js$", diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-wrapped.src.xjs b/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-wrapped.src.xjs deleted file mode 100644 index 1740302f8291..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-wrapped.src.xjs +++ /dev/null @@ -1 +0,0 @@ -({f: function({x} = {x: 10}) {}}); \ No newline at end of file diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/invalid-not-final-array-empty.src.xjs b/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/invalid-not-final-array-empty.src.xjs deleted file mode 100644 index 6154cfe049dd..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/invalid-not-final-array-empty.src.xjs +++ /dev/null @@ -1 +0,0 @@ -[...a, ] = b; \ No newline at end of file diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/not-final-array.src.xjs b/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/not-final-array.src.xjs deleted file mode 100644 index cb9a2a141cc8..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/not-final-array.src.xjs +++ /dev/null @@ -1 +0,0 @@ -[...a, b] = c; \ No newline at end of file diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-anonymous-function.src.ts b/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-anonymous-function.src.ts deleted file mode 100644 index 70b8a557ddb3..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-anonymous-function.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "foo" { - export default function (): string; -} diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-guard.src.ts b/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-guard.src.ts deleted file mode 100644 index cd0aad9a869c..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-guard.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function isString(x: any): x is string { - return typeof x === 'string' -} \ No newline at end of file diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts b/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts deleted file mode 100644 index 02c0c9131844..000000000000 --- a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts +++ /dev/null @@ -1,24 +0,0 @@ -interface Foo { - bar: string = 'a'; - public a: string; - private b: string; - protected c: string; - static d: string; - export e: string; - readonly f: string; - - public [baz: string]: string; - private [baz: string]: string; - protected [baz: string]: string; - static [baz: string]: string; - export [baz: string]: string; - readonly [baz: string]: string; - - public g(bar: string): void; - private h(bar: string): void; - protected i(bar: string): void; - static j(bar: string): void; - export k(bar: string): void; - readonly l(bar: string): void; -} - diff --git a/packages/typescript-eslint-parser/tests/lib/.eslintrc.yml b/packages/typescript-eslint-parser/tests/lib/.eslintrc.yml deleted file mode 100644 index e19b2cfa824a..000000000000 --- a/packages/typescript-eslint-parser/tests/lib/.eslintrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -env: - jest: true diff --git a/packages/typescript-eslint-parser/tests/lib/__snapshots__/comments.js.snap b/packages/typescript-eslint-parser/tests/lib/__snapshots__/comments.js.snap index cf52cd5abb37..39b28f15c60f 100644 --- a/packages/typescript-eslint-parser/tests/lib/__snapshots__/comments.js.snap +++ b/packages/typescript-eslint-parser/tests/lib/__snapshots__/comments.js.snap @@ -1912,7 +1912,7 @@ Object { } `; -exports[`Comments fixtures/jsx-tag-comments.src 1`] = ` +exports[`Comments fixtures/jsx-comment-after-jsx.src 1`] = ` Object { "body": Array [ Object { @@ -1942,68 +1942,46 @@ Object { "body": Array [ Object { "argument": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 103, - 112, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - ], + "children": Array [], "closingElement": Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { - "column": 8, - "line": 7, + "column": 13, + "line": 3, }, }, "name": Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, }, "name": "Foo", "range": Array [ - 114, - 117, + 49, + 52, ], "type": "JSXIdentifier", }, "range": Array [ - 112, - 118, + 47, + 53, ], "type": "JSXClosingElement", }, "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { "column": 8, @@ -2014,8 +1992,8 @@ Object { "attributes": Array [], "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 13, + "line": 3, }, "start": Object { "column": 8, @@ -2042,21 +2020,21 @@ Object { }, "range": Array [ 42, - 103, + 47, ], "selfClosing": false, "type": "JSXOpeningElement", }, "range": Array [ 42, - 118, + 53, ], "type": "JSXElement", }, "loc": Object { "end": Object { "column": 6, - "line": 8, + "line": 4, }, "start": Object { "column": 4, @@ -2065,7 +2043,7 @@ Object { }, "range": Array [ 25, - 125, + 67, ], "type": "ReturnStatement", }, @@ -2073,7 +2051,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 19, @@ -2082,7 +2060,7 @@ Object { }, "range": Array [ 19, - 127, + 69, ], "type": "BlockStatement", }, @@ -2092,7 +2070,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 13, @@ -2102,14 +2080,14 @@ Object { "params": Array [], "range": Array [ 13, - 127, + 69, ], "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 6, @@ -2118,7 +2096,7 @@ Object { }, "range": Array [ 6, - 127, + 69, ], "type": "VariableDeclarator", }, @@ -2127,7 +2105,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 0, @@ -2136,7 +2114,7 @@ Object { }, "range": Array [ 0, - 127, + 69, ], "type": "VariableDeclaration", }, @@ -2145,44 +2123,26 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 26, + "line": 3, }, "start": Object { - "column": 12, - "line": 4, + "column": 20, + "line": 3, }, }, "range": Array [ - 59, - 68, + 54, + 60, ], "type": "Line", - "value": " single", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 81, - 92, - ], - "type": "Block", - "value": " block ", + "value": " Foo", }, ], "loc": Object { "end": Object { "column": 0, - "line": 11, + "line": 6, }, "start": Object { "column": 0, @@ -2191,7 +2151,7 @@ Object { }, "range": Array [ 0, - 129, + 70, ], "sourceType": "module", "tokens": Array [ @@ -2396,17 +2356,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 6, + "column": 12, + "line": 3, }, }, "range": Array [ - 102, - 103, + 46, + 47, ], "type": "Punctuator", "value": ">", @@ -2414,36 +2374,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 103, - 112, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, + "column": 14, + "line": 3, }, "start": Object { - "column": 8, - "line": 7, + "column": 13, + "line": 3, }, }, "range": Array [ - 112, - 113, + 47, + 48, ], "type": "Punctuator", "value": "<", @@ -2451,17 +2392,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, "start": Object { - "column": 9, - "line": 7, + "column": 14, + "line": 3, }, }, "range": Array [ - 113, - 114, + 48, + 49, ], "type": "Punctuator", "value": "/", @@ -2469,17 +2410,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, }, "range": Array [ - 114, - 117, + 49, + 52, ], "type": "JSXIdentifier", "value": "Foo", @@ -2487,17 +2428,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, }, "range": Array [ - 117, - 118, + 52, + 53, ], "type": "Punctuator", "value": ">", @@ -2506,16 +2447,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 8, + "line": 4, }, "start": Object { "column": 4, - "line": 8, + "line": 4, }, }, "range": Array [ - 123, - 124, + 65, + 66, ], "type": "Punctuator", "value": ")", @@ -2524,16 +2465,16 @@ Object { "loc": Object { "end": Object { "column": 6, - "line": 8, + "line": 4, }, "start": Object { "column": 5, - "line": 8, + "line": 4, }, }, "range": Array [ - 124, - 125, + 66, + 67, ], "type": "Punctuator", "value": ";", @@ -2542,16 +2483,4102 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 0, - "line": 9, + "line": 5, }, }, "range": Array [ - 126, - 127, + 68, + 69, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-comment-after-self-closing-jsx.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "pure", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "children": Array [], + "closingElement": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 43, + 46, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 42, + 49, + ], + "selfClosing": true, + "type": "JSXOpeningElement", + }, + "range": Array [ + 42, + 49, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 63, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 65, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 65, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 65, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 65, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 50, + 56, + ], + "type": "Line", + "value": " Foo", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 66, + ], + "sourceType": "module", + "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": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "pure", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 31, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 43, + 46, + ], + "type": "JSXIdentifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-tag-comments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "pure", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "children": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 103, + 112, + ], + "raw": " + ", + "type": "JSXText", + "value": " + ", + }, + ], + "closingElement": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 7, + }, + }, + "name": "Foo", + "range": Array [ + 114, + 117, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 112, + 118, + ], + "type": "JSXClosingElement", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 43, + 46, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 42, + 103, + ], + "selfClosing": false, + "type": "JSXOpeningElement", + }, + "range": Array [ + 42, + 118, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 125, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 127, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 127, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 127, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 127, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 59, + 68, + ], + "type": "Line", + "value": " single", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 81, + 92, + ], + "type": "Block", + "value": " block ", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 11, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 129, + ], + "sourceType": "module", + "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": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "pure", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 31, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 43, + 46, + ], + "type": "JSXIdentifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 103, + 112, + ], + "type": "JSXText", + "value": " + ", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 113, + 114, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 7, + }, + }, + "range": Array [ + 114, + 117, + ], + "type": "JSXIdentifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 13, + "line": 7, + }, + }, + "range": Array [ + 117, + 118, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 123, + 124, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 8, + }, + "start": Object { + "column": 5, + "line": 8, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 126, + 127, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-text-with-multiline-non-comment.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "pure", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "children": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 41, + 80, + ], + "raw": " + /** + * test + */ + ", + "type": "JSXText", + "value": " + /** + * test + */ + ", + }, + ], + "closingElement": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "name": "Foo", + "range": Array [ + 82, + 85, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 80, + 86, + ], + "type": "JSXClosingElement", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 37, + 40, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 36, + 41, + ], + "selfClosing": false, + "type": "JSXOpeningElement", + }, + "range": Array [ + 36, + 86, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 4, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 23, + 91, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 93, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 93, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 93, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 93, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 94, + ], + "sourceType": "module", + "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": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "pure", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 37, + 40, + ], + "type": "JSXIdentifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 41, + 80, + ], + "type": "JSXText", + "value": " + /** + * test + */ + ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "range": Array [ + 82, + 85, + ], + "type": "JSXIdentifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 8, + }, + "start": Object { + "column": 3, + "line": 8, + }, + }, + "range": Array [ + 90, + 91, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-text-with-url.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "link", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "children": Array [ + Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 61, + ], + "raw": "http://example.com", + "type": "JSXText", + "value": "http://example.com", + }, + ], + "closingElement": Object { + "loc": Object { + "end": Object { + "column": 65, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 63, + 64, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 61, + 65, + ], + "type": "JSXClosingElement", + }, + "loc": Object { + "end": Object { + "column": 65, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "openingElement": Object { + "attributes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "href", + "range": Array [ + 17, + 21, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 17, + 42, + ], + "type": "JSXAttribute", + "value": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 42, + ], + "raw": "\\"http://example.com\\"", + "type": "Literal", + "value": "http://example.com", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 15, + 16, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 14, + 43, + ], + "selfClosing": false, + "type": "JSXOpeningElement", + }, + "range": Array [ + 14, + 65, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 66, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 66, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 67, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 67, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 68, + ], + "sourceType": "module", + "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": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "link", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "JSXIdentifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "JSXIdentifier", + "value": "href", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 42, + ], + "type": "JSXText", + "value": "\\"http://example.com\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 61, + ], + "type": "JSXText", + "value": "http://example.com", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "JSXIdentifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 65, + "line": 1, + }, + "start": Object { + "column": 64, + "line": 1, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 66, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 67, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-with-greather-than.src 1`] = ` +Object { + "body": Array [ + Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": ">>", + "range": Array [ + 30, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "BinaryExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 38, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "foo", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + "init": Object { + "children": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 59, + 61, + ], + "raw": "//", + "type": "JSXText", + "value": "//", + }, + ], + "closingElement": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "test", + "range": Array [ + 63, + 67, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 61, + 68, + ], + "type": "JSXClosingElement", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "test", + "range": Array [ + 54, + 58, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 53, + 59, + ], + "selfClosing": false, + "type": "JSXOpeningElement", + }, + "range": Array [ + 53, + 68, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 68, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 41, + 68, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 70, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 70, + ], + "test": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "operator": ">", + "range": Array [ + 4, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "type": "BinaryExpression", + }, + "type": "IfStatement", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "Block", + "value": " Test ", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 71, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Keyword", + "value": "if", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 32, + 34, + ], + "type": "Punctuator", + "value": ">>", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 41, + 46, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 54, + 58, + ], + "type": "JSXIdentifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 59, + 61, + ], + "type": "JSXText", + "value": "//", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 63, + 67, + ], + "type": "JSXIdentifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/jsx-with-operators.src 1`] = ` +Object { + "body": Array [ + Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": ">>", + "range": Array [ + 30, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "BinaryExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 38, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "foo", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + "init": Object { + "children": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 59, + 61, + ], + "raw": "//", + "type": "JSXText", + "value": "//", + }, + ], + "closingElement": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "test", + "range": Array [ + 63, + 67, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 61, + 68, + ], + "type": "JSXClosingElement", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "test", + "range": Array [ + 54, + 58, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 53, + 59, + ], + "selfClosing": false, + "type": "JSXOpeningElement", + }, + "range": Array [ + 53, + 68, + ], + "type": "JSXElement", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 68, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 41, + 68, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 70, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 70, + ], + "test": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 4, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "type": "BinaryExpression", + }, + "type": "IfStatement", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "Block", + "value": " Test ", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 71, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Keyword", + "value": "if", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 32, + 34, + ], + "type": "Punctuator", + "value": ">>", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 41, + 46, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 54, + 58, + ], + "type": "JSXIdentifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 59, + 61, + ], + "type": "JSXText", + "value": "//", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 63, + 67, + ], + "type": "JSXIdentifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 69, + 70, ], "type": "Punctuator", "value": "}", diff --git a/packages/typescript-eslint-parser/tests/lib/__snapshots__/ecma-features.js.snap b/packages/typescript-eslint-parser/tests/lib/__snapshots__/javascript.js.snap similarity index 77% rename from packages/typescript-eslint-parser/tests/lib/__snapshots__/ecma-features.js.snap rename to packages/typescript-eslint-parser/tests/lib/__snapshots__/javascript.js.snap index 570124e64f76..e9c04f72d828 100644 --- a/packages/typescript-eslint-parser/tests/lib/__snapshots__/ecma-features.js.snap +++ b/packages/typescript-eslint-parser/tests/lib/__snapshots__/javascript.js.snap @@ -1,73 +1,104 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ecmaFeatures fixtures/arrowFunctions/as-param.src 1`] = ` +exports[`javascript fixtures/arrayLiteral/array-literal-in-lhs.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "arguments": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "object": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 5, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { "loc": Object { "end": Object { - "column": 12, + "column": 2, "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, + "name": "fn", "range": Array [ - 10, - 12, + 0, + 2, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ - 4, - 12, + 0, + 6, ], - "type": "ArrowFunctionExpression", + "type": "CallExpression", }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "property": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", }, - "name": "foo", "range": Array [ 0, - 3, + 8, ], - "type": "Identifier", + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { @@ -75,15 +106,34 @@ Object { "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 13, + 14, ], - "type": "CallExpression", + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -93,7 +143,7 @@ Object { }, "range": Array [ 0, - 14, + 15, ], "type": "ExpressionStatement", }, @@ -101,8 +151,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -111,14 +161,14 @@ Object { }, "range": Array [ 0, - 14, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 2, "line": 1, }, "start": Object { @@ -128,10 +178,28 @@ Object { }, "range": Array [ 0, - 3, + 2, ], "type": "Identifier", - "value": "foo", + "value": "fn", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -149,7 +217,7 @@ Object { 4, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { @@ -167,7 +235,7 @@ Object { 5, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { @@ -190,43 +258,61 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 9, ], "type": "Punctuator", - "value": "=>", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { "column": 10, "line": 1, }, + "start": Object { + "column": 9, + "line": 1, + }, }, "range": Array [ + 9, 10, - 11, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -236,43 +322,230 @@ Object { }, "range": Array [ 11, - 12, + 14, + ], + "type": "Identifier", + "value": "obj", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/arrayLiteral/array-literals-in-binary-expr.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "+", + "range": Array [ + 0, + 7, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 7, + ], + "type": "ArrayExpression", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 9, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 13, + "column": 1, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 1, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 2, "line": 1, }, "start": Object { - "column": 13, + "column": 1, "line": 1, }, }, "range": Array [ - 13, - 14, + 1, + 2, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, ], "type": "Punctuator", "value": ";", @@ -282,7 +555,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/as-param-with-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/as-param.src 1`] = ` Object { "body": Array [ Object { @@ -294,17 +567,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 16, + 10, + 12, ], "type": "BlockStatement", }, @@ -313,7 +586,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { @@ -321,47 +594,10 @@ Object { "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - ], + "params": Array [], "range": Array [ 4, - 16, + 12, ], "type": "ArrowFunctionExpression", }, @@ -386,7 +622,7 @@ Object { }, "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 1, }, "start": Object { @@ -396,13 +632,13 @@ Object { }, "range": Array [ 0, - 17, + 13, ], "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { @@ -412,7 +648,7 @@ Object { }, "range": Array [ 0, - 18, + 14, ], "type": "ExpressionStatement", }, @@ -420,7 +656,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { @@ -430,7 +666,7 @@ Object { }, "range": Array [ 0, - 18, + 14, ], "sourceType": "module", "tokens": Array [ @@ -503,62 +739,62 @@ Object { 5, 6, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 9, ], "type": "Punctuator", - "value": ",", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 10, + 11, + 12, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { @@ -567,37 +803,356 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, + 12, 13, ], "type": "Punctuator", - "value": "=>", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 14, - 15, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/arrowFunctions/as-param-with-params.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { + "expression": Object { + "arguments": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 4, + 16, + ], + "type": "ArrowFunctionExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { "end": Object { "column": 16, "line": 1, @@ -655,7 +1210,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/basic.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/basic.src 1`] = ` Object { "body": Array [ Object { @@ -829,7 +1384,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/basic-in-binary-expression.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/basic-in-binary-expression.src 1`] = ` Object { "body": Array [ Object { @@ -1513,7 +2068,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/block-body.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/block-body.src 1`] = ` Object { "body": Array [ Object { @@ -1778,7 +2333,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/block-body-not-object.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/block-body-not-object.src 1`] = ` Object { "body": Array [ Object { @@ -2096,7 +2651,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-dup-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-dup-params.src 1`] = ` Object { "body": Array [ Object { @@ -2361,17 +2916,17 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-missing-paren.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-missing-paren.src 1`] = `"';' expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/error-not-arrow.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/arrowFunctions/error-not-arrow.src 1`] = `"Expression expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/error-numeric-param.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-numeric-param.src 1`] = `"';' expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/error-numeric-param-multi.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-numeric-param-multi.src 1`] = `"';' expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/error-reverse-arrow.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/arrowFunctions/error-reverse-arrow.src 1`] = `"Expression expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-default-param-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-default-param-eval.src 1`] = ` Object { "body": Array [ Object { @@ -2727,7 +3282,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-dup-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-dup-params.src 1`] = ` Object { "body": Array [ Object { @@ -3065,7 +3620,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-eval.src 1`] = ` Object { "body": Array [ Object { @@ -3403,7 +3958,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-eval-return.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-eval-return.src 1`] = ` Object { "body": Array [ Object { @@ -3669,7 +4224,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-octal.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-octal.src 1`] = ` Object { "body": Array [ Object { @@ -3953,7 +4508,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-param-arguments.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-arguments.src 1`] = ` Object { "body": Array [ Object { @@ -4291,7 +4846,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-param-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-eval.src 1`] = ` Object { "body": Array [ Object { @@ -4629,7 +5184,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-param-names.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-names.src 1`] = ` Object { "body": Array [ Object { @@ -4967,7 +5522,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-param-no-paren-arguments.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-no-paren-arguments.src 1`] = ` Object { "body": Array [ Object { @@ -5215,7 +5770,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-strict-param-no-paren-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-no-paren-eval.src 1`] = ` Object { "body": Array [ Object { @@ -5463,7 +6018,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-two-lines.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-two-lines.src 1`] = ` Object { "body": Array [ Object { @@ -5729,9 +6284,9 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/error-wrapped-param.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-wrapped-param.src 1`] = `"';' expected."`; -exports[`ecmaFeatures fixtures/arrowFunctions/expression.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/expression.src 1`] = ` Object { "body": Array [ Object { @@ -5941,7 +6496,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/iife.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/iife.src 1`] = ` Object { "body": Array [ Object { @@ -6282,7 +6837,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/multiple-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/multiple-params.src 1`] = ` Object { "body": Array [ Object { @@ -6547,7 +7102,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/no-auto-return.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/no-auto-return.src 1`] = ` Object { "body": Array [ Object { @@ -6902,7 +7457,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/not-strict-arguments.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-arguments.src 1`] = ` Object { "body": Array [ Object { @@ -7077,7 +7632,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/not-strict-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-eval.src 1`] = ` Object { "body": Array [ Object { @@ -7252,7 +7807,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/not-strict-eval-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-eval-params.src 1`] = ` Object { "body": Array [ Object { @@ -7517,7 +8072,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/not-strict-octal.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-octal.src 1`] = ` Object { "body": Array [ Object { @@ -7728,7 +8283,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/return-arrow-function.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/return-arrow-function.src 1`] = ` Object { "body": Array [ Object { @@ -7980,7 +8535,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/return-sequence.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/return-sequence.src 1`] = ` Object { "body": Array [ Object { @@ -8556,7 +9111,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/single-param.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param.src 1`] = ` Object { "body": Array [ Object { @@ -8731,7 +9286,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/single-param-parens.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param-parens.src 1`] = ` Object { "body": Array [ Object { @@ -8942,7 +9497,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/arrowFunctions/single-param-return-identifier.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param-return-identifier.src 1`] = ` Object { "body": Array [ Object { @@ -9152,33 +9707,30693 @@ Object { } `; -exports[`ecmaFeatures fixtures/bigIntLiterals/binary.src 1`] = ` +exports[`javascript fixtures/basics/and-operator-array-object.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 8, + 10, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 16, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 22, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 42, + ], + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 33, + 41, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 39, + 41, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 42, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 48, + 49, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 52, + 60, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 60, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 52, + 66, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "properties": Array [], + "range": Array [ + 64, + 66, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 52, + 72, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 72, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 52, + 86, + ], + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 77, + 85, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 85, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 86, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 87, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 98, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "operator": "&&", + "range": Array [ + 96, + 104, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 104, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 92, + 104, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 105, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 110, + 111, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 114, + 116, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "operator": "&&", + "range": Array [ + 114, + 122, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 120, + 122, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 110, + 122, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 106, + 123, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 124, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "v", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 47, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 55, + 57, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 61, + 63, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 67, + 69, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 72, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 73, + 75, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 80, + 82, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 91, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 97, + 98, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 99, + 101, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 104, + 105, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 106, + 109, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 110, + 111, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 117, + 119, + ], + "type": "Punctuator", + "value": "&&", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 122, + 123, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/delete-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 14, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "delete", + "prefix": true, + "range": Array [ + 0, + 14, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "delete", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/do-while-statements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "EmptyStatement", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "test": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "DoWhileStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "i", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 25, + ], + "type": "VariableDeclaration", + }, + Object { + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "name": "i", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "operator": "+=", + "range": Array [ + 34, + 40, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 39, + 40, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 3, + "line": 4, + }, + }, + "range": Array [ + 29, + 43, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 26, + 58, + ], + "test": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "name": "i", + "range": Array [ + 51, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "operator": "<", + "range": Array [ + 51, + 56, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "range": Array [ + 55, + 56, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "BinaryExpression", + }, + "type": "DoWhileStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 59, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Keyword", + "value": "do", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "Keyword", + "value": "while", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "Keyword", + "value": "do", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 4, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "Punctuator", + "value": "+=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 44, + 49, + ], + "type": "Keyword", + "value": "while", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Numeric", + "value": "5", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 15, + "line": 6, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/identifiers-double-underscore.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "__test", + "range": Array [ + 4, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 17, + ], + "raw": "'ff'", + "type": "Literal", + "value": "ff", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 17, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "VariableDeclaration", + }, + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 32, + 36, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "__Foo", + "range": Array [ + 26, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 20, + 36, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 7, + }, + }, + "range": Array [ + 55, + 59, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "name": "__Bar", + "range": Array [ + 47, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "params": Array [], + "range": Array [ + 38, + 59, + ], + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 60, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 10, + ], + "type": "Identifier", + "value": "__test", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 17, + ], + "type": "String", + "value": "'ff'", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 20, + 25, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 26, + 31, + ], + "type": "Identifier", + "value": "__Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 47, + 52, + ], + "type": "Identifier", + "value": "__Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 7, + }, + "start": Object { + "column": 14, + "line": 7, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 7, + }, + "start": Object { + "column": 15, + "line": 7, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 7, + }, + "start": Object { + "column": 17, + "line": 7, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/instanceof.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "raw": "''", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "instanceof", + "range": Array [ + 0, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Set", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "String", + "value": "''", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 13, + ], + "type": "Keyword", + "value": "instanceof", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "Set", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/new-with-member-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 4, + 11, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/new-without-parens.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 0, + 16, + ], + "type": "FunctionDeclaration", + }, + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 17, + 22, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 17, + 23, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "X", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "X", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/or-operator-array-object.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 8, + 10, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 16, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 22, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 42, + ], + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 33, + 41, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 39, + 41, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 42, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 48, + 49, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 60, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 60, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 66, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "properties": Array [], + "range": Array [ + 64, + 66, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 72, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 72, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 86, + ], + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 77, + 85, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 85, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 86, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 87, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 98, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "operator": "||", + "range": Array [ + 96, + 104, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 104, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 92, + 104, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 105, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 110, + 111, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 114, + 116, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "operator": "||", + "range": Array [ + 114, + 122, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 120, + 122, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 110, + 122, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 106, + 123, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 124, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "v", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 47, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 55, + 57, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 61, + 63, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 67, + 69, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 72, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 73, + 75, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "type": "String", + "value": "\\"\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 80, + 82, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 91, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 97, + 98, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 99, + 101, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 104, + 105, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 106, + 109, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 110, + 111, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 117, + 119, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 122, + 123, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/typeof-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "raw": "'str'", + "type": "Literal", + "value": "str", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 0, + 12, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "String", + "value": "'str'", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/update-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "VariableDeclaration", + }, + Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "i", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "operator": "++", + "prefix": false, + "range": Array [ + 28, + 31, + ], + "type": "UpdateExpression", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 28, + 32, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 24, + 34, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "f", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 11, + 34, + ], + "type": "FunctionDeclaration", + }, + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "name": "f", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 39, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Punctuator", + "value": "++", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/void-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "void", + "prefix": true, + "range": Array [ + 0, + 6, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 13, + 14, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "operator": "void", + "prefix": true, + "range": Array [ + 8, + 15, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 8, + 16, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Numeric", + "value": "4", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/binary.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0b1n", + "type": "BigIntLiteral", + "value": "0b1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0b1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/decimal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "raw": "1n", + "type": "BigIntLiteral", + "value": "1", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Identifier", + "value": "1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/hex.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0x1n", + "type": "BigIntLiteral", + "value": "0x1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0x1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/octal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0o1n", + "type": "BigIntLiteral", + "value": "0o1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0o1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/binaryLiterals/lowercase.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "raw": "0b101", + "type": "Literal", + "value": 5, + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Numeric", + "value": "0b101", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/binaryLiterals/uppercase.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "raw": "0B101", + "type": "Literal", + "value": 5, + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Numeric", + "value": "0B101", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/blockBindings/const.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 15, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "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": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/blockBindings/let.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 13, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/blockBindings/let-in-switchcase.src 1`] = ` +Object { + "body": Array [ + Object { + "cases": Array [ + Object { + "consequent": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "t", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 38, + ], + "type": "VariableDeclaration", + }, + Object { + "label": null, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "BreakStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 45, + ], + "test": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "type": "SwitchCase", + }, + ], + "discriminant": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "answer", + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "type": "SwitchStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "switch", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "answer", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + 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": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "Keyword", + "value": "case", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Numeric", + "value": "42", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + "value": "t", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "type": "Numeric", + "value": "42", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 44, + ], + "type": "Keyword", + "value": "break", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/call-expression-with-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 6, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/call-expression-with-object.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 4, + 6, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/mixed-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "properties": Array [], + "range": Array [ + 67, + 69, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 59, + 61, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "properties": Array [], + "range": Array [ + 46, + 48, + ], + "type": "ObjectExpression", + }, + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 50, + 52, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 40, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "call", + "range": Array [ + 41, + 45, + ], + "type": "Identifier", + }, + "range": Array [ + 36, + 45, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 53, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 53, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 30, + 57, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 18, + 57, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 62, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 63, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 65, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 1, + 65, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 70, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 71, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 18, + 26, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 40, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "Identifier", + "value": "call", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 4, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 4, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/new-expression-with-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 10, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "properties": Array [], + "range": Array [ + 23, + 25, + ], + "type": "ObjectExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 26, + ], + "type": "ArrayExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 28, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 29, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/new-expression-with-object.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 8, + 10, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-accessor-properties.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 14, + 18, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 29, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 29, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 24, + 29, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 31, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ")", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-computed-static-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 23, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 19, + 23, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 25, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "superClass": null, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-method-named-prototype.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "prototype", + "range": Array [ + 9, + 18, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 18, + 22, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 23, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "type": "Identifier", + "value": "prototype", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-method-named-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "static", + "range": Array [ + 9, + 15, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 19, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 15, + 19, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 21, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "(", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-method-named-with-space.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "withSpace", + "range": Array [ + 9, + 18, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 24, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 19, + 24, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 25, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "type": "Identifier", + "value": "withSpace", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-one-method.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": 4, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 19, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 15, + 19, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 21, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-one-method-super.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": 4, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "Super", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 41, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 15, + 41, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 43, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 45, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "Keyword", + "value": "super", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-static-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 21, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 21, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 23, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-static-method-named-prototype.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 28, + ], + "raw": "\\"prototype\\"", + "type": "Literal", + "value": "prototype", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 33, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 29, + 33, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 34, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 35, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + 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": 28, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 28, + ], + "type": "String", + "value": "\\"prototype\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-static-method-named-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "static", + "range": Array [ + 16, + 22, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 26, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 22, + 26, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 28, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-static-methods-and-accessor-properties.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 21, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 21, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 38, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 34, + 38, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 56, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 56, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 51, + 56, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 58, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 59, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 49, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-computed-static-methods.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 18, + 22, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 37, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 33, + 37, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 38, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 30, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-methods.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 10, + 14, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 19, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 15, + 19, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 20, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "(", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 26, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 22, + 26, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 41, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 46, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 46, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 42, + 46, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 47, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "type": "String", + "value": "\\"constructor\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 41, + ], + "type": "String", + "value": "\\"constructor\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-methods-semi.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 10, + 14, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 16, + 20, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 21, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "b", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-methods-three-semi.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 15, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 11, + 15, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 21, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 23, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-methods-two-semi.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 10, + 14, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 16, + 20, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 22, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "b", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-two-static-methods-named-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 16, + 27, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 31, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 27, + 31, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 39, + 50, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 54, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 50, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 55, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 27, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 50, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-with-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 24, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 20, + 24, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 25, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "}", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-with-constructor-parameters.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 32, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 32, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 20, + 32, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 33, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "foo", + }, + 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": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-with-constructor-with-space.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 25, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 21, + 25, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 26, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/derived-class-assign-to-var.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 27, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 27, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 27, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/derived-class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 18, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 14, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Numeric", + "value": "0", + }, + 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": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-class.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 10, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-class-double-semi.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 10, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-class-semi.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-literal-derived-class.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 15, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/invalid-class-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/invalid-class-setter-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 22, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 22, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 23, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; + +exports[`javascript fixtures/classes/named-class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 11, + ], + "superClass": null, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/named-derived-class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 20, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/class-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 44, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 37, + 44, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 35, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 25, + 44, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 46, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 46, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "String", + "value": "'bar'", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/class-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 36, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 27, + ], + "raw": "'baz'", + "type": "Literal", + "value": "baz", + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 17, + 36, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 38, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 27, + ], + "type": "String", + "value": "'baz'", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 0, + 20, + ], + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Numeric", + "value": "1", + }, + 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": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 22, + ], + "right": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 4, + 22, + ], + "type": "FunctionExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/method.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 27, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 9, + 25, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 4, + 27, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + 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": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/not-all-params.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "type": "AssignmentPattern", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 10, + 35, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 35, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 18, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "b", + }, + 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": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "Numeric", + "value": "42", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/array-member.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "ok", + "range": Array [ + 1, + 3, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "range": Array [ + 1, + 5, + ], + "type": "MemberExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "20", + "type": "Literal", + "value": 20, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 3, + ], + "type": "Identifier", + "value": "ok", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "v", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "20", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/array-to-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 15, + ], + "right": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/array-var-undefined.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "ArrayPattern", + }, + "init": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/call-expression-destruction-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "argument": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "SpreadElement", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/call-expression-destruction-object.src 1`] = ` Object { "body": Array [ Object { "expression": Object { + "arguments": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 7, + 9, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "SpreadElement", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-constructor-params-array.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 45, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 45, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 36, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 25, + 45, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 47, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "consturctor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 49, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 42, + 49, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 39, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 40, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 25, + 49, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 51, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "consturctor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Numeric", + "value": "4", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-object.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 49, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 42, + 49, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 27, + 32, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 34, + 39, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 39, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 26, + 40, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 25, + 49, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 51, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "consturctor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Numeric", + "value": "4", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-constructor-params-object.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 45, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 45, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 27, + 30, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 32, + 35, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 26, + 36, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 25, + 45, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 47, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "consturctor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-method-params-array.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 37, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 28, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 17, + 37, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 39, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 32, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 17, + 41, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 43, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Numeric", + "value": "4", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/class-method-params-defaults-object.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 24, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 26, + 31, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 18, + 32, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 17, + 41, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 4, + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 43, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, + "name": "A", "range": Array [ - 0, - 4, + 6, + 7, ], - "raw": "0b1n", - "type": "BigIntLiteral", - "value": "0b1", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -9187,16 +40402,17 @@ Object { }, "range": Array [ 0, - 5, + 43, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -9205,78 +40421,596 @@ Object { }, "range": Array [ 0, - 6, + 44, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 4, + 40, + 41, ], - "type": "Identifier", - "value": "0b1n", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 4, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 4, - 5, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/bigIntLiterals/decimal.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-object.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 37, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 22, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 24, + 27, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 18, + 28, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 17, + 37, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 2, + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 39, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, + "name": "A", "range": Array [ - 0, - 2, + 6, + 7, ], - "raw": "1n", - "type": "BigIntLiteral", - "value": "1", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -9285,16 +41019,17 @@ Object { }, "range": Array [ 0, - 3, + 39, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -9303,14 +41038,14 @@ Object { }, "range": Array [ 0, - 4, + 40, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { @@ -9320,338 +41055,331 @@ Object { }, "range": Array [ 0, - 2, + 5, ], - "type": "Identifier", - "value": "1n", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 3, + 6, + 7, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "A", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/bigIntLiterals/hex.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "raw": "0x1n", - "type": "BigIntLiteral", - "value": "0x1", - }, "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 8, "line": 1, }, }, "range": Array [ - 0, - 5, + 8, + 9, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 6, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 0, - 4, + 14, + 17, ], "type": "Identifier", - "value": "0x1n", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 4, - 5, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/bigIntLiterals/octal.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, }, - "range": Array [ - 0, - 4, - ], - "raw": "0o1n", - "type": "BigIntLiteral", - "value": "0o1", }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 0, - 5, + 19, + 22, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + "type": "Identifier", + "value": "bar", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 6, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 0, - 4, + 24, + 27, ], "type": "Identifier", - "value": "0o1n", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 4, - 5, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; - -exports[`ecmaFeatures fixtures/binaryLiterals/lowercase.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "0b101", - "type": "Literal", - "value": 5, - }, "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 0, - 6, + 30, + 31, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 5, + 36, + 37, ], - "type": "Numeric", - "value": "0b101", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 5, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 5, - 6, + 38, + 39, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/binaryLiterals/uppercase.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array.src 1`] = ` Object { "body": Array [ Object { "expression": Object { + "left": Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 5, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { @@ -9659,17 +41387,34 @@ Object { "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 5, + 10, ], - "raw": "0B101", - "type": "Literal", - "value": 5, + "right": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { @@ -9679,7 +41424,7 @@ Object { }, "range": Array [ 0, - 6, + 10, ], "type": "ExpressionStatement", }, @@ -9687,8 +41432,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { "column": 0, @@ -9697,14 +41442,14 @@ Object { }, "range": Array [ 0, - 7, + 10, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -9714,128 +41459,47 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Numeric", - "value": "0B101", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, "range": Array [ - 5, - 6, + 1, + 2, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/blockBindings/const.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", "loc": Object { "end": Object { - "column": 16, + "column": 3, "line": 1, }, "start": Object { - "column": 0, + "column": 2, "line": 1, }, }, "range": Array [ - 0, - 16, + 2, + 3, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "=", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { @@ -9843,49 +41507,49 @@ Object { "line": 1, }, "start": Object { - "column": 0, + "column": 3, "line": 1, }, }, "range": Array [ - 0, + 3, 5, ], - "type": "Keyword", - "value": "const", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 9, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 11, + 7, + 8, ], "type": "Punctuator", "value": "=", @@ -9893,54 +41557,200 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, - 15, + 9, + 10, ], "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", + "value": "x", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/blockBindings/let.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-all.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + ], "loc": Object { "end": Object { - "column": 7, + "column": 26, "line": 1, }, "start": Object { @@ -9948,34 +41758,33 @@ Object { "line": 1, }, }, - "name": "foo", "range": Array [ 4, - 7, + 26, ], - "type": "Identifier", + "type": "ArrayPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 13, + "column": 30, "line": 1, }, "start": Object { - "column": 10, + "column": 29, "line": 1, }, }, - "name": "bar", + "name": "a", "range": Array [ - 10, - 13, + 29, + 30, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 13, + "column": 30, "line": 1, }, "start": Object { @@ -9985,15 +41794,15 @@ Object { }, "range": Array [ 4, - 13, + 30, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "kind": "var", "loc": Object { "end": Object { - "column": 14, + "column": 31, "line": 1, }, "start": Object { @@ -10003,7 +41812,7 @@ Object { }, "range": Array [ 0, - 14, + 31, ], "type": "VariableDeclaration", }, @@ -10011,8 +41820,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { "column": 0, @@ -10021,7 +41830,7 @@ Object { }, "range": Array [ 0, - 15, + 31, ], "sourceType": "module", "tokens": Array [ @@ -10041,12 +41850,12 @@ Object { 3, ], "type": "Keyword", - "value": "let", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -10056,293 +41865,82 @@ Object { }, "range": Array [ 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, + 5, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 6, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 13, + 5, + 6, ], "type": "Identifier", - "value": "bar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, "range": Array [ - 13, - 14, + 7, + 8, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/blockBindings/let-in-switchcase.src 1`] = ` -Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "t", - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 38, - ], - "type": "VariableDeclaration", - }, - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 45, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "answer", - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "type": "SwitchStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "value": "=", }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 6, + 9, + 11, ], - "type": "Keyword", - "value": "switch", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { - "column": 7, + "column": 11, "line": 1, }, }, "range": Array [ - 7, - 8, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { @@ -10351,157 +41949,103 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, + 13, 14, ], "type": "Identifier", - "value": "answer", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ 16, - 17, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { "column": 18, "line": 1, }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 25, + 17, + 18, ], "type": "Numeric", - "value": "42", + "value": "5", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 19, "line": 1, }, "start": Object { - "column": 25, + "column": 18, "line": 1, }, }, "range": Array [ - 25, - 26, + 18, + 19, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "let", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 21, "line": 1, }, "start": Object { - "column": 31, + "column": 20, "line": 1, }, }, "range": Array [ - 31, - 32, + 20, + 21, ], "type": "Identifier", - "value": "t", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 23, "line": 1, }, "start": Object { - "column": 33, + "column": 22, "line": 1, }, }, "range": Array [ - 33, - 34, + 22, + 23, ], "type": "Punctuator", "value": "=", @@ -10509,317 +42053,427 @@ Object { Object { "loc": Object { "end": Object { - "column": 37, + "column": 25, "line": 1, }, "start": Object { - "column": 35, + "column": 24, "line": 1, }, }, "range": Array [ - 35, - 37, + 24, + 25, ], "type": "Numeric", - "value": "42", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 26, "line": 1, }, "start": Object { - "column": 37, + "column": 25, "line": 1, }, }, "range": Array [ - 37, - 38, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 28, "line": 1, }, "start": Object { - "column": 39, + "column": 27, "line": 1, }, }, "range": Array [ - 39, - 44, + 27, + 28, ], - "type": "Keyword", - "value": "break", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 30, "line": 1, }, "start": Object { - "column": 44, + "column": 29, "line": 1, }, }, "range": Array [ - 44, - 45, + 29, + 30, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 31, "line": 1, }, "start": Object { - "column": 46, + "column": 30, "line": 1, }, }, "range": Array [ - 46, - 47, + 30, + 31, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-accessor-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "get", + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 18, + "column": 34, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 18, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 16, + "column": 5, "line": 1, }, }, + "method": false, "range": Array [ - 16, - 18, + 5, + 9, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 14, - 18, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", }, - }, - "name": "b", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 29, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 29, + "column": 15, "line": 1, }, "start": Object { - "column": 27, + "column": 11, "line": 1, }, }, + "method": false, "range": Array [ - 27, - 29, + 11, + 15, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", }, }, - "params": Array [ - Object { + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 26, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, - "name": "c", + "name": "z", "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Identifier", }, - ], - "range": Array [ - 24, - 29, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 17, + 32, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 22, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 20, + 32, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 4, + 34, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 31, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 37, + 38, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 38, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 31, + "column": 39, "line": 1, }, "start": Object { @@ -10829,33 +42483,15 @@ Object { }, "range": Array [ 0, - 31, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, + 39, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 32, + "column": 39, "line": 1, }, "start": Object { @@ -10865,14 +42501,14 @@ Object { }, "range": Array [ 0, - 32, + 39, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -10882,10 +42518,46 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -10902,8 +42574,8 @@ Object { 6, 7, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -10920,8 +42592,26 @@ Object { 8, 9, ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { @@ -10930,34 +42620,34 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, + 11, 12, ], "type": "Identifier", - "value": "get", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 14, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -10974,8 +42664,8 @@ Object { 14, 15, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -10993,97 +42683,97 @@ Object { 16, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, - 22, + 20, + 21, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, "line": 1, }, }, "range": Array [ + 22, 23, - 24, ], "type": "Identifier", - "value": "b", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 24, "line": 1, }, "start": Object { - "column": 24, + "column": 23, "line": 1, }, }, "range": Array [ + 23, 24, - 25, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { @@ -11101,58 +42791,58 @@ Object { 26, ], "type": "Identifier", - "value": "c", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 28, "line": 1, }, "start": Object { - "column": 26, + "column": 27, "line": 1, }, }, "range": Array [ - 26, 27, + 28, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 31, "line": 1, }, "start": Object { - "column": 27, + "column": 29, "line": 1, }, }, "range": Array [ - 27, - 28, + 29, + 31, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { - "column": 28, + "column": 31, "line": 1, }, }, "range": Array [ - 28, - 29, + 31, + 32, ], "type": "Punctuator", "value": "}", @@ -11160,53 +42850,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 34, "line": 1, }, "start": Object { - "column": 29, + "column": 33, "line": 1, }, }, "range": Array [ - 29, - 30, + 33, + 34, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 36, "line": 1, }, "start": Object { - "column": 30, + "column": 35, "line": 1, }, }, "range": Array [ - 30, - 31, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 38, "line": 1, }, "start": Object { - "column": 31, + "column": 37, "line": 1, }, }, "range": Array [ - 31, - 32, + 37, + 38, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, ], "type": "Punctuator", "value": ";", @@ -11216,613 +42924,421 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-computed-static-method.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "start": Object { - "column": 17, - "line": 1, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, - "name": "a", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 23, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, + "name": "y", "range": Array [ - 21, - 23, + 13, + 14, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, - "params": Array [], - "range": Array [ - 19, - 23, - ], - "type": "FunctionExpression", }, + "range": Array [ + 4, + 18, + ], + "type": "ArrayPattern", }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - 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": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, ], - "type": "Identifier", - "value": "a", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 19, + "column": 23, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 23, ], - "type": "Punctuator", - "value": "]", + "type": "VariableDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 21, + "column": 3, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 3, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 5, "line": 1, }, "start": Object { - "column": 21, + "column": 4, "line": 1, }, }, "range": Array [ - 21, - 22, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 5, "line": 1, }, }, "range": Array [ - 22, - 23, + 5, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 8, "line": 1, }, "start": Object { - "column": 23, + "column": 7, "line": 1, }, }, "range": Array [ - 23, - 24, + 7, + 8, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 9, "line": 1, }, }, "range": Array [ - 24, - 25, + 9, + 11, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { - "column": 25, + "column": 11, "line": 1, }, }, "range": Array [ - 25, - 26, + 11, + 12, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "superClass": null, - "type": "ClassExpression", - }, "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 0, + "column": 13, "line": 1, }, }, "range": Array [ - 0, - 11, + 13, + 14, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 1, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 16, "line": 1, }, }, "range": Array [ - 1, - 6, + 16, + 17, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, "range": Array [ - 7, - 8, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 19, "line": 1, }, }, "range": Array [ - 8, - 9, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 21, "line": 1, }, }, "range": Array [ - 9, - 10, + 21, + 22, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 23, "line": 1, }, "start": Object { - "column": 10, + "column": 22, "line": 1, }, }, "range": Array [ - 10, - 11, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -11832,164 +43348,215 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-method-named-prototype.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-nested-all.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "start": Object { - "column": 9, - "line": 1, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, - "name": "prototype", - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], "loc": Object { "end": Object { "column": 22, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, "range": Array [ - 20, + 13, 22, ], - "type": "BlockStatement", + "type": "ArrayPattern", }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, - "params": Array [], - "range": Array [ - 18, - 22, - ], - "type": "FunctionExpression", }, + "range": Array [ + 4, + 23, + ], + "type": "ArrayPattern", }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 27, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 24, + "column": 28, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 28, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 24, + "column": 28, "line": 1, }, "start": Object { @@ -11999,14 +43566,14 @@ Object { }, "range": Array [ 0, - 24, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -12016,313 +43583,172 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, - 18, + 5, + 6, ], "type": "Identifier", - "value": "prototype", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 8, "line": 1, }, "start": Object { - "column": 18, + "column": 7, "line": 1, }, }, "range": Array [ - 18, - 19, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 19, + "column": 9, "line": 1, }, }, "range": Array [ - 19, - 20, + 9, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 12, "line": 1, }, "start": Object { - "column": 20, + "column": 11, "line": 1, }, }, "range": Array [ - 20, - 21, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 14, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, "range": Array [ - 21, - 22, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 16, "line": 1, }, "start": Object { - "column": 22, + "column": 15, "line": 1, }, }, "range": Array [ - 22, - 23, + 15, + 16, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 24, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-method-named-static.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "static", - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, + 19, 21, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { @@ -12339,436 +43765,415 @@ Object { 21, 22, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 23, "line": 1, }, "start": Object { - "column": 6, + "column": 22, "line": 1, }, }, "range": Array [ - 6, - 7, + 22, + 23, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 25, "line": 1, }, "start": Object { - "column": 8, + "column": 24, "line": 1, }, }, "range": Array [ - 8, - 9, + 24, + 25, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 9, + "column": 26, "line": 1, }, }, "range": Array [ - 9, - 15, + 26, + 27, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { - "column": 15, + "column": 27, "line": 1, }, }, "range": Array [ - 15, - 16, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 19, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 23, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 16, - 17, ], - "type": "Punctuator", - "value": ")", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 18, + "column": 24, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 24, ], - "type": "Punctuator", - "value": "{", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 19, + "column": 3, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 3, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 4, "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Punctuator", - "value": ";", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 8, ], "type": "Punctuator", - "value": ";", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-method-named-with-space.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "withSpace", - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 19, - 24, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 25, + 9, + 11, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "10", }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 5, + 11, + 12, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 13, "line": 1, }, }, "range": Array [ - 6, - 7, + 13, + 14, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 9, + 15, + 16, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { @@ -12777,34 +44182,34 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, + 17, 18, ], - "type": "Identifier", - "value": "withSpace", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { - "column": 19, + "column": 18, "line": 1, }, }, "range": Array [ + 18, 19, - 20, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { @@ -12822,7 +44227,7 @@ Object { 21, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { @@ -12839,8 +44244,8 @@ Object { 22, 23, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -12858,154 +44263,171 @@ Object { 24, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/classes/class-one-method.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object.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": 4, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 5, + "line": 1, }, }, + "method": false, "range": Array [ - 17, - 19, + 5, + 11, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, + ], + "range": Array [ + 4, + 12, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { "column": 0, @@ -13014,34 +44436,16 @@ Object { }, "range": Array [ 0, - 21, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, + 16, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { "column": 0, @@ -13050,14 +44454,14 @@ Object { }, "range": Array [ 0, - 22, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -13067,133 +44471,97 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, Object { "loc": Object { "end": Object { "column": 6, - "line": 2, + "line": 1, }, "start": Object { "column": 5, - "line": 2, + "line": 1, }, }, "range": Array [ - 15, - 16, + 5, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 16, - 17, + 7, + 8, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 17, - 18, + 9, + 11, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -13201,220 +44569,388 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/classes/class-one-method-super.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-all.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": 4, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 26, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Super", + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 27, - 34, - ], - "type": "CallExpression", }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 18, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 20, + 25, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 25, + ], + "right": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 27, - 35, + 24, + 25, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, + "raw": "1", + "type": "Literal", + "value": 1, }, + "type": "AssignmentPattern", }, - "range": Array [ - 17, - 41, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 2, - }, + ], + "range": Array [ + 4, + 26, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, }, - "params": Array [], - "range": Array [ - 15, - 41, - ], - "type": "FunctionExpression", }, + "name": "a", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 31, + "line": 1, }, "start": Object { "column": 0, @@ -13423,34 +44959,16 @@ Object { }, "range": Array [ 0, - 43, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, + 31, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 31, + "line": 1, }, "start": Object { "column": 0, @@ -13459,14 +44977,14 @@ Object { }, "range": Array [ 0, - 45, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -13476,74 +44994,128 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { "column": 6, "line": 1, }, + "start": Object { + "column": 5, + "line": 1, + }, }, "range": Array [ + 5, 6, - 7, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ + 13, 14, - 15, ], "type": "Identifier", - "value": "a", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ @@ -13551,166 +45123,166 @@ Object { 16, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ - 27, - 32, + 20, + 21, ], - "type": "Keyword", - "value": "super", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ - 32, - 33, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 33, - 34, + 24, + 25, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 34, - 35, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 27, + "line": 1, }, }, "range": Array [ - 40, - 41, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 42, - 43, + 29, + 30, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 31, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 30, + "line": 1, }, }, "range": Array [ - 43, - 44, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -13720,128 +45292,254 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-static-method.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-assign.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 3, "line": 1, }, }, - "name": "a", + "method": false, "range": Array [ - 16, - 17, + 3, + 11, ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", }, }, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { - "column": 19, + "column": 13, "line": 1, }, }, + "name": "String", "range": Array [ + 13, 19, - 21, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, - "params": Array [], + "method": false, "range": Array [ - 17, + 13, 21, ], - "type": "FunctionExpression", + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "String", + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", + }, }, - }, - ], + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 23, + "column": 28, "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, + "operator": "=", "range": Array [ - 8, - 23, + 1, + 28, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "properties": Array [], + "range": Array [ + 26, + 28, + ], + "type": "ObjectExpression", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 29, "line": 1, }, "start": Object { @@ -13851,34 +45549,16 @@ Object { }, "range": Array [ 0, - 23, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, + 29, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -13887,14 +45567,14 @@ Object { }, "range": Array [ 0, - 24, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -13904,28 +45584,28 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -13934,21 +45614,21 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, + 3, 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Object", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -13958,46 +45638,46 @@ Object { }, "range": Array [ 9, - 15, + 10, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 17, + "column": 11, "line": 1, }, }, "range": Array [ - 17, - 18, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { @@ -14006,16 +45686,16 @@ Object { "line": 1, }, "start": Object { - "column": 18, + "column": 13, "line": 1, }, }, "range": Array [ - 18, + 13, 19, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "String", }, Object { "loc": Object { @@ -14033,7 +45713,7 @@ Object { 20, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { @@ -14050,41 +45730,77 @@ Object { 20, 21, ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], "type": "Punctuator", "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 25, "line": 1, }, "start": Object { - "column": 21, + "column": 24, "line": 1, }, }, "range": Array [ - 21, - 22, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 22, + "column": 26, "line": 1, }, }, "range": Array [ - 22, - 23, + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -14092,185 +45808,201 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 29, "line": 1, }, "start": Object { - "column": 23, + "column": 28, "line": 1, }, }, "range": Array [ - 23, - 24, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": ")", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/classes/class-static-method-named-prototype.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "raw": "\\"prototype\\"", - "type": "Literal", - "value": "prototype", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 33, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 33, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 33, + "column": 15, "line": 1, }, "start": Object { - "column": 31, + "column": 6, "line": 1, }, }, + "method": false, "range": Array [ - 31, - 33, + 6, + 15, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "params": Array [], - "range": Array [ - 29, - 33, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + ], + "range": Array [ + 4, + 17, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 34, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 35, + "column": 22, "line": 1, }, "start": Object { - "column": 34, + "column": 0, "line": 1, }, }, "range": Array [ - 34, - 35, + 0, + 22, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 35, + "column": 22, "line": 1, }, "start": Object { @@ -14280,14 +46012,14 @@ Object { }, "range": Array [ 0, - 35, + 22, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -14297,43 +46029,25 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -14341,179 +46055,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 15, + 6, + 7, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 8, "line": 1, }, "start": Object { - "column": 16, + "column": 7, "line": 1, }, }, "range": Array [ - 16, - 17, + 7, + 8, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "type": "String", - "value": "\\"prototype\\"", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 10, "line": 1, }, "start": Object { - "column": 28, + "column": 9, "line": 1, }, }, "range": Array [ - 28, - 29, + 9, + 10, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 12, "line": 1, }, "start": Object { - "column": 29, + "column": 11, "line": 1, }, }, "range": Array [ - 29, - 30, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 1, }, "start": Object { - "column": 30, + "column": 13, "line": 1, }, }, "range": Array [ - 30, - 31, + 13, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 17, "line": 1, }, "start": Object { - "column": 31, + "column": 16, "line": 1, }, }, "range": Array [ - 31, - 32, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 19, "line": 1, }, "start": Object { - "column": 32, + "column": 18, "line": 1, }, }, "range": Array [ - 32, - 33, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 21, "line": 1, }, "start": Object { - "column": 33, + "column": 20, "line": 1, }, }, "range": Array [ - 33, - 34, + 20, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 22, "line": 1, }, "start": Object { - "column": 34, + "column": 21, "line": 1, }, }, "range": Array [ - 34, - 35, + 21, + 22, ], "type": "Punctuator", "value": ";", @@ -14523,128 +46219,349 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-static-method-named-static.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform-all.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "static", - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 26, + "column": 37, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 26, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 26, + "column": 14, "line": 1, }, "start": Object { - "column": 24, + "column": 5, "line": 1, }, }, + "method": false, "range": Array [ - 24, - 26, + 5, + 14, ], - "type": "BlockStatement", + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", }, - "start": Object { - "column": 22, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 27, + 36, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 36, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "params": Array [], - "range": Array [ - 22, - 26, - ], - "type": "FunctionExpression", + ], + "range": Array [ + 4, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 28, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 41, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 28, + "column": 42, "line": 1, }, "start": Object { @@ -14654,33 +46571,15 @@ Object { }, "range": Array [ 0, - 28, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, + 42, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 29, + "column": 42, "line": 1, }, "start": Object { @@ -14690,14 +46589,14 @@ Object { }, "range": Array [ 0, - 29, + 42, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -14707,43 +46606,25 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -14751,656 +46632,720 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 5, "line": 1, }, }, "range": Array [ - 22, - 23, + 5, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 7, "line": 1, }, "start": Object { - "column": 23, + "column": 6, "line": 1, }, }, "range": Array [ - 23, - 24, + 6, + 7, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 9, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, "range": Array [ - 24, - 25, + 8, + 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 11, "line": 1, }, "start": Object { - "column": 25, + "column": 10, "line": 1, }, }, "range": Array [ - 25, - 26, + 10, + 11, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 12, "line": 1, }, }, "range": Array [ - 26, - 27, + 12, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 1, }, "start": Object { - "column": 27, + "column": 14, "line": 1, }, }, "range": Array [ - 27, - 28, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-static-methods-and-accessor-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 38, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 34, - 38, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 56, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 56, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 51, - 56, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 8, - 58, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 58, + "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, - 58, + 19, + 20, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 59, + "column": 22, "line": 1, }, "start": Object { - "column": 58, + "column": 21, "line": 1, }, }, "range": Array [ - 58, - 59, + 21, + 22, ], - "type": "EmptyStatement", + "type": "Punctuator", + "value": "=", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Numeric", + "value": "10", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 28, "line": 1, }, "start": Object { - "column": 0, + "column": 27, "line": 1, }, }, "range": Array [ - 0, - 5, + 27, + 28, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 29, "line": 1, }, "start": Object { - "column": 6, + "column": 28, "line": 1, }, }, "range": Array [ - 6, - 7, + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, ], "type": "Identifier", - "value": "A", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 33, "line": 1, }, "start": Object { - "column": 8, + "column": 32, "line": 1, }, }, "range": Array [ - 8, - 9, + 32, + 33, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 36, "line": 1, }, "start": Object { - "column": 9, + "column": 34, "line": 1, }, }, "range": Array [ - 9, - 15, + 34, + 36, ], - "type": "Keyword", - "value": "static", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 37, "line": 1, }, "start": Object { - "column": 16, + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, "line": 1, }, - }, - "range": Array [ - 16, - 17, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 11, + 20, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 22, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 27, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 31, + ], + "type": "VariableDeclarator", + }, ], - "type": "Identifier", - "value": "a", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 18, + "column": 32, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 32, ], - "type": "Punctuator", - "value": "(", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 19, + "column": 3, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 3, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 4, "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -15408,323 +47353,305 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 7, "line": 1, }, "start": Object { - "column": 22, + "column": 6, "line": 1, }, }, "range": Array [ - 22, - 28, + 6, + 7, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 9, "line": 1, }, "start": Object { - "column": 29, + "column": 8, "line": 1, }, }, "range": Array [ - 29, - 32, + 8, + 9, ], "type": "Identifier", - "value": "get", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 10, "line": 1, }, "start": Object { - "column": 33, + "column": 9, "line": 1, }, }, "range": Array [ - 33, - 34, + 9, + 10, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 12, "line": 1, }, "start": Object { - "column": 34, + "column": 11, "line": 1, }, }, "range": Array [ - 34, - 35, + 11, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 13, "line": 1, }, "start": Object { - "column": 35, + "column": 12, "line": 1, }, }, "range": Array [ - 35, - 36, + 12, + 13, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 15, "line": 1, }, "start": Object { - "column": 36, + "column": 14, "line": 1, }, }, "range": Array [ - 36, - 37, + 14, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 17, "line": 1, }, "start": Object { - "column": 37, + "column": 16, "line": 1, }, }, "range": Array [ - 37, - 38, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 20, "line": 1, }, "start": Object { - "column": 39, + "column": 18, "line": 1, }, }, "range": Array [ - 39, - 45, + 18, + 20, ], - "type": "Keyword", - "value": "static", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 49, + "column": 21, "line": 1, }, "start": Object { - "column": 46, + "column": 20, "line": 1, }, }, "range": Array [ - 46, - 49, + 20, + 21, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 23, "line": 1, }, "start": Object { - "column": 50, + "column": 22, "line": 1, }, }, "range": Array [ - 50, - 51, + 22, + 23, ], "type": "Identifier", - "value": "a", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 24, "line": 1, }, "start": Object { - "column": 51, + "column": 23, "line": 1, }, }, "range": Array [ - 51, - 52, + 23, + 24, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 53, + "column": 26, "line": 1, }, "start": Object { - "column": 52, + "column": 25, "line": 1, }, }, "range": Array [ - 52, - 53, + 25, + 26, ], "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ")", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 55, + "column": 27, "line": 1, }, "start": Object { - "column": 54, + "column": 26, "line": 1, }, }, "range": Array [ - 54, - 55, + 26, + 27, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 56, + "column": 29, "line": 1, }, "start": Object { - "column": 55, + "column": 28, "line": 1, }, }, "range": Array [ - 55, - 56, + 28, + 29, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 58, + "column": 31, "line": 1, }, "start": Object { - "column": 57, + "column": 30, "line": 1, }, }, "range": Array [ - 57, - 58, + 30, + 31, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 59, + "column": 32, "line": 1, }, "start": Object { - "column": 58, + "column": 31, "line": 1, }, }, "range": Array [ - 58, - 59, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -15734,114 +47661,242 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-computed-static-methods.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-mixed-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 22, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 22, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, + "method": false, "range": Array [ - 20, - 22, + 5, + 6, ], - "type": "BlockStatement", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, - "start": Object { - "column": 18, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 8, + 17, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 17, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 19, + 20, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 18, - 22, - ], - "type": "FunctionExpression", - }, + ], + "range": Array [ + 4, + 21, + ], + "type": "ObjectPattern", }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - }, - "kind": "method", + "init": Object { "loc": Object { "end": Object { - "column": 37, + "column": 25, "line": 1, }, "start": Object { @@ -15849,91 +47904,34 @@ Object { "line": 1, }, }, + "name": "a", "range": Array [ 24, - 37, + 25, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 33, - 37, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 38, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 25, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 38, + "column": 26, "line": 1, }, "start": Object { @@ -15943,33 +47941,15 @@ Object { }, "range": Array [ 0, - 38, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, + 26, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 39, + "column": 26, "line": 1, }, "start": Object { @@ -15979,14 +47959,14 @@ Object { }, "range": Array [ 0, - 39, + 26, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -15996,43 +47976,25 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -16040,341 +48002,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { - "column": 16, + "column": 5, "line": 1, }, }, "range": Array [ - 16, - 17, + 5, + 6, ], "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 18, + "column": 6, "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 7, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 19, + "column": 8, "line": 1, }, }, "range": Array [ - 19, - 20, + 8, + 9, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 10, "line": 1, }, "start": Object { - "column": 20, + "column": 9, "line": 1, }, }, "range": Array [ - 20, - 21, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 21, + "column": 11, "line": 1, }, }, "range": Array [ - 21, - 22, + 11, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 13, "line": 1, }, }, "range": Array [ - 22, - 23, + 13, + 14, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 17, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, "range": Array [ - 24, - 30, + 15, + 17, ], - "type": "Keyword", - "value": "static", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { - "column": 30, + "column": 17, "line": 1, }, }, "range": Array [ - 30, - 31, + 17, + 18, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 20, "line": 1, }, "start": Object { - "column": 31, + "column": 19, "line": 1, }, }, "range": Array [ - 31, - 32, + 19, + 20, ], "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 21, "line": 1, }, "start": Object { - "column": 35, + "column": 20, "line": 1, }, }, "range": Array [ - 35, - 36, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 23, "line": 1, }, "start": Object { - "column": 36, + "column": 22, "line": 1, }, }, "range": Array [ - 36, - 37, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 25, "line": 1, }, "start": Object { - "column": 37, + "column": 24, "line": 1, }, }, "range": Array [ - 37, - 38, + 24, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 26, "line": 1, }, "start": Object { - "column": 38, + "column": 25, "line": 1, }, }, "range": Array [ - 38, - 39, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -16384,206 +48238,277 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-methods.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "start": Object { - "column": 9, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, + "method": false, "range": Array [ - 12, + 13, 14, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", }, - }, - "name": "b", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 19, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, + "method": false, "range": Array [ + 16, 17, - 19, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + ], + "range": Array [ + 4, + 18, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 20, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { @@ -16593,33 +48518,15 @@ Object { }, "range": Array [ 0, - 20, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, + 23, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 21, + "column": 23, "line": 1, }, "start": Object { @@ -16629,14 +48536,14 @@ Object { }, "range": Array [ 0, - 21, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -16646,43 +48553,25 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -16690,74 +48579,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, - 10, + 5, + 6, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 11, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 11, - 12, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 13, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { @@ -16774,8 +48663,8 @@ Object { 13, 14, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -16792,26 +48681,8 @@ Object { 14, 15, ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { @@ -16828,8 +48699,8 @@ Object { 16, 17, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { @@ -16847,58 +48718,58 @@ Object { 18, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 20, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 21, "line": 1, }, }, "range": Array [ - 19, - 20, + 21, + 22, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 23, "line": 1, }, "start": Object { - "column": 20, + "column": 22, "line": 1, }, }, "range": Array [ - 20, - 21, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -16908,208 +48779,314 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-nested-all.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "constructor", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { "column": 26, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 26, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 26, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 5, "line": 1, }, }, + "method": false, "range": Array [ - 24, - 26, + 5, + 11, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "params": Array [], - "range": Array [ - 22, - 26, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", }, - }, - "range": Array [ - 28, - 41, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 46, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 46, + "column": 25, "line": 1, }, "start": Object { - "column": 44, + "column": 13, "line": 1, }, }, + "method": false, "range": Array [ - 44, - 46, + 13, + 25, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 24, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 16, + 25, + ], + "type": "ObjectPattern", }, }, - "params": Array [], - "range": Array [ - 42, - 46, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + ], + "range": Array [ + 4, + 26, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 47, + "column": 31, "line": 1, }, "start": Object { @@ -17119,33 +49096,15 @@ Object { }, "range": Array [ 0, - 47, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, + 31, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 48, + "column": 31, "line": 1, }, "start": Object { @@ -17155,14 +49114,14 @@ Object { }, "range": Array [ 0, - 48, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -17172,295 +49131,295 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 22, + 7, + 8, ], - "type": "String", - "value": "\\"constructor\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 9, "line": 1, }, }, "range": Array [ - 22, - 23, + 9, + 11, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 12, "line": 1, }, "start": Object { - "column": 23, + "column": 11, "line": 1, }, }, "range": Array [ - 23, - 24, + 11, + 12, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 14, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "range": Array [ - 24, - 25, + 13, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 15, "line": 1, }, "start": Object { - "column": 25, + "column": 14, "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 27, + "column": 16, "line": 1, }, }, "range": Array [ - 27, - 28, + 16, + 17, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 19, "line": 1, }, "start": Object { - "column": 28, + "column": 18, "line": 1, }, }, "range": Array [ - 28, - 41, + 18, + 19, ], - "type": "String", - "value": "\\"constructor\\"", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 21, "line": 1, }, "start": Object { - "column": 41, + "column": 20, "line": 1, }, }, "range": Array [ - 41, - 42, + 20, + 21, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 24, "line": 1, }, "start": Object { - "column": 42, + "column": 22, "line": 1, }, }, "range": Array [ - 42, - 43, + 22, + 24, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 25, "line": 1, }, "start": Object { - "column": 43, + "column": 24, "line": 1, }, }, "range": Array [ - 43, - 44, + 24, + 25, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 26, "line": 1, }, "start": Object { - "column": 44, + "column": 25, "line": 1, }, }, "range": Array [ - 44, - 45, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 28, "line": 1, }, "start": Object { - "column": 45, + "column": 27, "line": 1, }, }, "range": Array [ - 45, - 46, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 30, "line": 1, }, "start": Object { - "column": 46, + "column": 29, "line": 1, }, }, "range": Array [ - 46, - 47, + 29, + 30, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 48, + "column": 31, "line": 1, }, "start": Object { - "column": 47, + "column": 30, "line": 1, }, }, "range": Array [ - 47, - 48, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -17470,206 +49429,278 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-methods-semi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 5, "line": 1, }, }, + "method": false, "range": Array [ - 12, - 14, + 5, + 11, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", }, - }, - "name": "b", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 20, + "column": 21, "line": 1, }, "start": Object { - "column": 18, + "column": 13, "line": 1, }, }, + "method": false, "range": Array [ - 18, - 20, + 13, + 21, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 19, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 16, + 21, + ], + "type": "ObjectPattern", }, }, - "params": Array [], - "range": Array [ - 16, - 20, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + ], + "range": Array [ + 4, + 22, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 26, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 21, + "column": 27, "line": 1, }, "start": Object { @@ -17679,33 +49710,15 @@ Object { }, "range": Array [ 0, - 21, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, + 27, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 27, "line": 1, }, "start": Object { @@ -17715,14 +49728,14 @@ Object { }, "range": Array [ 0, - 22, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -17730,45 +49743,27 @@ Object { "line": 1, }, }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, + "range": Array [ + 0, + 3, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -17776,74 +49771,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, - 10, + 5, + 6, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 11, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 11, - 12, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 13, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { @@ -17860,8 +49855,8 @@ Object { 13, 14, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -17879,130 +49874,130 @@ Object { 15, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 17, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 21, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 21, "line": 1, }, }, "range": Array [ - 18, - 19, + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 1, }, "start": Object { - "column": 19, + "column": 23, "line": 1, }, }, "range": Array [ - 19, - 20, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 26, "line": 1, }, "start": Object { - "column": 20, + "column": 25, "line": 1, }, }, "range": Array [ - 20, - 21, + 25, + 26, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 27, "line": 1, }, "start": Object { - "column": 21, + "column": 26, "line": 1, }, }, "range": Array [ - 21, - 22, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -18012,234 +50007,398 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-methods-three-semi.src 1`] = ` +exports[`javascript fixtures/destructuring/destructured-array-catch.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "block": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "method": false, + "range": Array [ + 35, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 34, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "VariableDeclaration", + }, + ], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 2, }, }, - "name": "a", "range": Array [ - 10, - 11, + 24, + 46, ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "type": "BlockStatement", }, - "range": Array [ - 10, - 15, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, + "finalizer": null, + "handler": Object { "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 13, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 13, - 15, + 64, + 69, ], "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 5, }, }, - "params": Array [], - "range": Array [ - 11, - 15, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, + "param": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, }, + "range": Array [ + 55, + 62, + ], + "type": "ArrayPattern", }, - "name": "b", "range": Array [ - 16, - 17, + 49, + 69, ], - "type": "Identifier", + "type": "CatchClause", }, - "kind": "method", "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 16, - 21, + 20, + 69, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "type": "FunctionExpression", - }, + "type": "TryStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, "range": Array [ - 8, - 23, + 16, + 71, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "A", + "name": "x", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { "column": 0, "line": 1, }, - }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 13, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ 0, - 23, + 71, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 23, - 24, + 71, + 72, ], "type": "EmptyStatement", }, @@ -18247,8 +50406,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { "column": 0, @@ -18257,14 +50416,14 @@ Object { }, "range": Array [ 0, - 24, + 72, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -18274,46 +50433,10 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ 8, - 9, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -18330,8 +50453,8 @@ Object { 9, 10, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -18348,8 +50471,8 @@ Object { 10, 11, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -18367,7 +50490,7 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -18384,8 +50507,8 @@ Object { 12, 13, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -18403,7 +50526,7 @@ Object { 14, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { @@ -18421,25 +50544,7 @@ Object { 15, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { @@ -18456,457 +50561,149 @@ Object { 16, 17, ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], "type": "Punctuator", "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, 23, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 23, 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-two-methods-two-semi.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 16, - 20, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 22, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 22, + 30, + 33, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 22, - 23, + 34, + 35, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 0, - 5, + 35, + 36, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 6, - 7, + 36, + 37, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 8, - 9, + 38, + 39, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 9, - 10, + 40, + 41, ], "type": "Identifier", "value": "a", @@ -18914,143 +50711,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 15, + "line": 3, }, }, "range": Array [ - 10, - 11, + 41, + 42, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 11, - 12, + 45, + 46, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 12, - 13, + 49, + 54, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 5, }, }, "range": Array [ - 13, - 14, + 54, + 55, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 14, - 15, + 55, + 56, ], "type": "Punctuator", - "value": ";", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 5, }, }, "range": Array [ - 15, - 16, + 56, + 61, ], "type": "Identifier", - "value": "b", + "value": "stack", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 16, - 17, + 61, + 62, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 16, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 5, }, }, "range": Array [ - 17, - 18, + 62, + 63, ], "type": "Punctuator", "value": ")", @@ -19058,17 +50855,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 18, - 19, + 64, + 65, ], "type": "Punctuator", "value": "{", @@ -19076,17 +50873,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 6, }, }, "range": Array [ - 19, - 20, + 68, + 69, ], "type": "Punctuator", "value": "}", @@ -19094,35 +50891,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 7, }, }, "range": Array [ - 21, - 22, + 70, + 71, ], "type": "Punctuator", "value": "}", @@ -19130,17 +50909,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 22, - 23, + 71, + 72, ], "type": "Punctuator", "value": ";", @@ -19150,234 +50929,437 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-two-static-methods-named-constructor.src 1`] = ` +exports[`javascript fixtures/destructuring/destructured-object-catch.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "block": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "method": false, + "range": Array [ + 35, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 34, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "VariableDeclaration", + }, + ], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 6, + "line": 2, }, }, - "name": "constructor", "range": Array [ - 16, - 27, + 24, + 46, ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "BlockStatement", }, - "range": Array [ - 9, - 31, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, + "finalizer": null, + "handler": Object { "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 29, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 29, - 31, + 64, + 69, ], "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 27, - "line": 1, + "column": 2, + "line": 5, }, }, - "params": Array [], - "range": Array [ - 27, - 31, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, + "param": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "method": false, + "range": Array [ + 56, + 61, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 55, + 62, + ], + "type": "ObjectPattern", }, - "name": "constructor", "range": Array [ - 39, - 50, + 49, + 69, ], - "type": "Identifier", + "type": "CatchClause", }, - "kind": "method", "loc": Object { "end": Object { - "column": 54, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 32, - 54, + 20, + 69, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 50, - 54, - ], - "type": "FunctionExpression", - }, + "type": "TryStatement", }, ], "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, "range": Array [ - 8, - 55, + 16, + 71, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "A", + "name": "x", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 13, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ 0, - 55, + 71, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 55, - 56, + 71, + 72, ], "type": "EmptyStatement", }, @@ -19385,8 +51367,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { "column": 0, @@ -19395,14 +51377,14 @@ Object { }, "range": Array [ 0, - 56, + 72, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -19412,51 +51394,15 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ 8, - 9, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -19466,43 +51412,25 @@ Object { }, "range": Array [ 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 27, + 10, ], "type": "Identifier", - "value": "constructor", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 11, "line": 1, }, "start": Object { - "column": 27, + "column": 10, "line": 1, }, }, "range": Array [ - 27, - 28, + 10, + 11, ], "type": "Punctuator", "value": "(", @@ -19510,35 +51438,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, + "column": 12, "line": 1, }, "start": Object { - "column": 29, + "column": 11, "line": 1, }, }, "range": Array [ - 29, - 30, + 11, + 12, ], "type": "Punctuator", "value": "{", @@ -19546,89 +51456,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, + "column": 13, "line": 1, }, "start": Object { - "column": 39, + "column": 12, "line": 1, }, }, "range": Array [ - 39, - 50, + 12, + 13, ], "type": "Identifier", - "value": "constructor", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 14, "line": 1, }, "start": Object { - "column": 50, + "column": 13, "line": 1, }, }, "range": Array [ - 50, - 51, + 13, + 14, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 15, "line": 1, }, "start": Object { - "column": 51, + "column": 14, "line": 1, }, }, "range": Array [ - 51, - 52, + 14, + 15, ], "type": "Punctuator", "value": ")", @@ -19636,17 +51510,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 53, + "column": 17, "line": 1, }, "start": Object { - "column": 52, + "column": 16, "line": 1, }, }, "range": Array [ - 52, - 53, + 16, + 17, ], "type": "Punctuator", "value": "{", @@ -19654,283 +51528,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 54, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 53, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 53, - 54, + 20, + 23, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 54, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 54, - 55, + 24, + 25, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 55, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 55, - 56, + 30, + 33, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/class-with-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 20, - 24, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "b", + }, + Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 0, - 25, + 36, + 37, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 25, - 26, + 38, + 39, ], - "type": "EmptyStatement", + "type": "Punctuator", + "value": "=", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "a", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 0, - 5, + 45, + 46, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 6, - 7, + 49, + 54, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "catch", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 7, + "line": 5, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 5, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "range": Array [ - 8, - 9, + 55, + 56, ], "type": "Punctuator", "value": "{", @@ -19938,53 +51762,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { "column": 9, - "line": 1, + "line": 5, }, }, "range": Array [ - 9, - 20, + 56, + 61, ], "type": "Identifier", - "value": "constructor", + "value": "stack", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 20, - 21, + 61, + 62, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 5, }, }, "range": Array [ - 21, - 22, + 62, + 63, ], "type": "Punctuator", "value": ")", @@ -19992,17 +51816,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 22, - 23, + 64, + 65, ], "type": "Punctuator", "value": "{", @@ -20010,17 +51834,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 6, }, }, "range": Array [ - 23, - 24, + 68, + 69, ], "type": "Punctuator", "value": "}", @@ -20028,17 +51852,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 7, }, }, "range": Array [ - 24, - 25, + 70, + 71, ], "type": "Punctuator", "value": "}", @@ -20046,17 +51870,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 25, - 26, + 71, + 72, ], "type": "Punctuator", "value": ";", @@ -20066,165 +51890,254 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-with-constructor-parameters.src 1`] = ` +exports[`javascript fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 3, "line": 1, }, }, - "name": "constructor", + "method": false, "range": Array [ - 9, - 20, + 3, + 11, ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", }, }, - "range": Array [ - 9, - 32, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 32, + "column": 19, "line": 1, }, "start": Object { - "column": 30, + "column": 13, "line": 1, }, }, + "name": "String", "range": Array [ - 30, - 32, + 13, + 19, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 32, + "column": 21, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, - "params": Array [ - Object { + "method": false, + "range": Array [ + 13, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { "loc": Object { "end": Object { - "column": 24, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, - "name": "foo", + "name": "String", "range": Array [ - 21, - 24, + 13, + 19, ], "type": "Identifier", }, - Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 21, + ], + "right": Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 26, + "column": 20, "line": 1, }, }, - "name": "bar", "range": Array [ - 26, - 29, + 20, + 21, ], - "type": "Identifier", + "raw": "0", + "type": "Literal", + "value": 0, }, - ], - "range": Array [ - 20, - 32, - ], - "type": "FunctionExpression", + "type": "AssignmentPattern", + }, }, - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectExpression", }, - "range": Array [ - 8, - 33, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 29, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", + "operator": "=", "range": Array [ - 6, - 7, + 0, + 29, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 27, + 29, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 33, + "column": 29, "line": 1, }, "start": Object { @@ -20234,10 +52147,9 @@ Object { }, "range": Array [ 0, - 33, + 29, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], @@ -20253,14 +52165,14 @@ Object { }, "range": Array [ 0, - 34, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -20270,28 +52182,28 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -20300,21 +52212,21 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, + 3, 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Object", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 10, "line": 1, }, "start": Object { @@ -20324,97 +52236,133 @@ Object { }, "range": Array [ 9, - 20, + 10, ], - "type": "Identifier", - "value": "constructor", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 10, "line": 1, }, }, "range": Array [ - 20, - 21, + 10, + 11, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, "range": Array [ - 21, - 24, + 13, + 19, ], "type": "Identifier", - "value": "foo", + "value": "String", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 19, "line": 1, }, }, "range": Array [ - 24, - 25, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 26, + "column": 20, "line": 1, }, }, "range": Array [ - 26, - 29, + 20, + 21, ], - "type": "Identifier", - "value": "bar", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 23, "line": 1, }, "start": Object { - "column": 29, + "column": 22, "line": 1, }, }, "range": Array [ - 29, - 30, + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", "value": ")", @@ -20422,53 +52370,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 26, "line": 1, }, "start": Object { - "column": 30, + "column": 25, "line": 1, }, }, "range": Array [ - 30, - 31, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 28, "line": 1, }, "start": Object { - "column": 31, + "column": 27, "line": 1, }, }, "range": Array [ - 31, - 32, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 29, "line": 1, }, "start": Object { - "column": 32, + "column": 28, "line": 1, }, }, "range": Array [ - 32, - 33, + 28, + 29, ], "type": "Punctuator", "value": "}", @@ -20478,128 +52426,125 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/class-with-constructor-with-space.src 1`] = ` +exports[`javascript fixtures/destructuring/named-param.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "range": Array [ - 9, - 20, - ], - "type": "Identifier", + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "start": Object { + "column": 1, + "line": 1, }, - "range": Array [ - 9, - 25, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 25, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 3, "line": 1, }, }, + "name": "responseText", "range": Array [ - 23, - 25, + 3, + 15, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 25, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 3, "line": 1, }, }, - "params": Array [], + "method": false, "range": Array [ + 3, 21, - 25, ], - "type": "FunctionExpression", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "text", + "range": Array [ + 17, + 21, + ], + "type": "Identifier", + }, }, - }, - ], + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 26, + "column": 29, "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, + "operator": "=", "range": Array [ - 8, - 26, + 1, + 29, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "name": "res", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 26, + "column": 31, "line": 1, }, "start": Object { @@ -20609,34 +52554,16 @@ Object { }, "range": Array [ 0, - 26, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, + 31, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { "column": 0, @@ -20645,14 +52572,14 @@ Object { }, "range": Array [ 0, - 28, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -20662,82 +52589,82 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 9, + 3, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "responseText", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 16, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 20, + 15, + 16, ], - "type": "Identifier", - "value": "constructor", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ + 17, 21, - 22, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "text", }, Object { "loc": Object { @@ -20755,76 +52682,76 @@ Object { 23, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 25, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, "range": Array [ - 23, 24, + 25, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 29, "line": 1, }, "start": Object { - "column": 24, + "column": 26, "line": 1, }, }, "range": Array [ - 24, - 25, + 26, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "res", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 30, "line": 1, }, "start": Object { - "column": 25, + "column": 29, "line": 1, }, }, "range": Array [ - 25, - 26, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { - "column": 26, + "column": 30, "line": 1, }, }, "range": Array [ - 26, - 27, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -20834,16 +52761,75 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/derived-class-assign-to-var.src 1`] = ` +exports[`javascript fixtures/destructuring/nested-array.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + null, + Object { + "elements": Array [ + null, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 15, + ], + "type": "ArrayPattern", + }, + ], "loc": Object { "end": Object { - "column": 5, + "column": 16, "line": 1, }, "start": Object { @@ -20851,88 +52837,129 @@ Object { "line": 1, }, }, - "name": "x", "range": Array [ 4, - 5, + 16, ], - "type": "Identifier", + "type": "ArrayPattern", }, "init": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, }, + "range": Array [ + 20, + 21, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, - "range": Array [ - 25, - 27, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, }, - "start": Object { - "column": 14, - "line": 1, + "range": Array [ + 22, + 23, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, }, + "range": Array [ + 24, + 29, + ], + "type": "ArrayExpression", }, - "name": "A", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { - "column": 27, + "column": 30, "line": 1, }, "start": Object { - "column": 8, + "column": 19, "line": 1, }, }, "range": Array [ - 8, - 27, + 19, + 30, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "ClassExpression", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 27, + "column": 30, "line": 1, }, "start": Object { @@ -20942,7 +52969,7 @@ Object { }, "range": Array [ 4, - 27, + 30, ], "type": "VariableDeclarator", }, @@ -20950,7 +52977,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 28, + "column": 31, "line": 1, }, "start": Object { @@ -20960,7 +52987,7 @@ Object { }, "range": Array [ 0, - 28, + 31, ], "type": "VariableDeclaration", }, @@ -20968,7 +52995,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 28, + "column": 31, "line": 1, }, "start": Object { @@ -20978,7 +53005,7 @@ Object { }, "range": Array [ 0, - 28, + 31, ], "sourceType": "module", "tokens": Array [ @@ -21015,578 +53042,383 @@ Object { 4, 5, ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, "range": Array [ - 14, - 15, + 5, + 6, ], "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "Keyword", - "value": "extends", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 7, "line": 1, }, "start": Object { - "column": 24, + "column": 6, "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 9, "line": 1, }, "start": Object { - "column": 25, + "column": 8, "line": 1, }, }, "range": Array [ - 25, - 26, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 11, "line": 1, }, "start": Object { - "column": 26, + "column": 10, "line": 1, }, }, "range": Array [ - 26, - 27, + 10, + 11, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 12, "line": 1, }, "start": Object { - "column": 27, + "column": 11, "line": 1, }, }, "range": Array [ - 27, - 28, + 11, + 12, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/derived-class-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 18, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "ClassExpression", - }, "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 0, + "column": 13, "line": 1, }, }, "range": Array [ - 0, - 20, + 13, + 14, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "z", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 1, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 16, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, "range": Array [ - 1, - 6, + 15, + 16, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, "range": Array [ - 7, - 14, + 17, + 18, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, "range": Array [ - 15, - 16, + 19, + 20, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, - 17, + 20, + 21, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 21, "line": 1, }, }, "range": Array [ - 17, - 18, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 23, "line": 1, }, "start": Object { - "column": 18, + "column": 22, "line": 1, }, }, "range": Array [ - 18, - 19, + 22, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 1, }, "start": Object { - "column": 19, + "column": 23, "line": 1, }, }, "range": Array [ - 19, - 20, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/empty-class.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + Object { "loc": Object { "end": Object { - "column": 10, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 10, + 24, + 25, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 25, "line": 1, }, }, "range": Array [ - 10, - 11, + 25, + 26, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "3", }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 27, "line": 1, }, "start": Object { - "column": 0, + "column": 26, "line": 1, }, }, "range": Array [ - 0, - 5, + 26, + 27, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 28, "line": 1, }, "start": Object { - "column": 6, + "column": 27, "line": 1, }, }, "range": Array [ - 6, - 7, + 27, + 28, ], - "type": "Identifier", - "value": "A", + "type": "Numeric", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 29, "line": 1, }, "start": Object { - "column": 8, + "column": 28, "line": 1, }, }, "range": Array [ - 8, - 9, + 28, + 29, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 30, "line": 1, }, "start": Object { - "column": 9, + "column": 29, "line": 1, }, }, "range": Array [ - 9, - 10, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 31, "line": 1, }, "start": Object { - "column": 10, + "column": 30, "line": 1, }, }, "range": Array [ - 10, - 11, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -21596,49 +53428,417 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/empty-class-double-semi.src 1`] = ` +exports[`javascript fixtures/destructuring/nested-object.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 11, + 22, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 20, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 14, + 22, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 4, + 24, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 10, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 29, + 35, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 35, + ], + "raw": "\\"3\\"", + "type": "Literal", + "value": "3", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 37, + 38, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 37, + 50, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 42, + 48, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 48, + ], + "raw": "\\"b\\"", + "type": "Literal", + "value": "b", + }, + }, + ], + "range": Array [ + 40, + 50, + ], + "type": "ObjectExpression", + }, + }, + ], + "range": Array [ + 27, + 52, + ], + "type": "ObjectExpression", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 52, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 10, + "column": 53, "line": 1, }, "start": Object { @@ -21648,33 +53848,15 @@ Object { }, "range": Array [ 0, - 10, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, + 53, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 11, + "column": 53, "line": 1, }, "start": Object { @@ -21684,14 +53866,14 @@ Object { }, "range": Array [ 0, - 11, + 53, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -21701,43 +53883,25 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -21745,153 +53909,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/empty-class-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { "column": 5, "line": 1, }, - "start": Object { - "column": 0, - "line": 1, - }, }, "range": Array [ - 0, 5, + 6, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -21908,8 +53939,8 @@ Object { 6, 7, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -21926,8 +53957,8 @@ Object { 8, 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -21945,25 +53976,7 @@ Object { 10, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { @@ -21980,159 +53993,26 @@ Object { 11, 12, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/empty-literal-derived-class.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 12, "line": 1, }, }, "range": Array [ - 6, - 7, + 12, + 13, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -22141,16 +54021,16 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, + 14, 15, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -22167,26 +54047,26 @@ Object { 16, 17, ], - "type": "Numeric", - "value": "0", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 18, "line": 1, }, "start": Object { - "column": 18, + "column": 17, "line": 1, }, }, "range": Array [ + 17, 18, - 19, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { @@ -22203,513 +54083,275 @@ Object { 19, 20, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/invalid-class-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "b", }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 5, + 21, + 22, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 24, "line": 1, }, "start": Object { - "column": 6, + "column": 23, "line": 1, }, }, "range": Array [ - 6, - 7, + 23, + 24, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 26, "line": 1, }, "start": Object { - "column": 7, + "column": 25, "line": 1, }, }, "range": Array [ - 7, - 8, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 28, "line": 1, }, "start": Object { - "column": 8, + "column": 27, "line": 1, }, }, "range": Array [ - 8, - 9, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/classes/invalid-class-setter-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 22, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 22, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 23, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 23, + 29, + 30, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 31, "line": 1, }, "start": Object { - "column": 23, + "column": 30, "line": 1, }, }, "range": Array [ - 23, - 24, + 30, + 31, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 35, "line": 1, }, "start": Object { - "column": 0, + "column": 32, "line": 1, }, }, "range": Array [ - 0, - 5, + 32, + 35, ], - "type": "Keyword", - "value": "class", + "type": "String", + "value": "\\"3\\"", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 36, "line": 1, }, "start": Object { - "column": 6, + "column": 35, "line": 1, }, }, "range": Array [ - 6, - 7, + 35, + 36, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 38, "line": 1, }, "start": Object { - "column": 8, + "column": 37, "line": 1, }, }, "range": Array [ - 8, - 9, + 37, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 39, "line": 1, }, "start": Object { - "column": 10, + "column": 38, "line": 1, }, }, "range": Array [ - 10, - 13, + 38, + 39, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 41, "line": 1, }, "start": Object { - "column": 14, + "column": 40, "line": 1, }, }, "range": Array [ - 14, - 17, + 40, + 41, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 43, "line": 1, }, "start": Object { - "column": 17, + "column": 42, "line": 1, }, }, "range": Array [ - 17, - 18, + 42, + 43, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 44, "line": 1, }, "start": Object { - "column": 18, + "column": 43, "line": 1, }, }, "range": Array [ - 18, - 19, + 43, + 44, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 48, "line": 1, }, "start": Object { - "column": 20, + "column": 45, "line": 1, }, }, "range": Array [ - 20, - 21, + 45, + 48, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"b\\"", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 50, "line": 1, }, "start": Object { - "column": 21, + "column": 49, "line": 1, }, }, "range": Array [ - 21, - 22, + 49, + 50, ], "type": "Punctuator", "value": "}", @@ -22717,17 +54359,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 52, "line": 1, }, "start": Object { - "column": 22, + "column": 51, "line": 1, }, }, "range": Array [ - 22, - 23, + 51, + 52, ], "type": "Punctuator", "value": "}", @@ -22735,17 +54377,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 53, "line": 1, }, "start": Object { - "column": 23, + "column": 52, "line": 1, }, }, "range": Array [ - 23, - 24, + 52, + 53, ], "type": "Punctuator", "value": ";", @@ -22755,135 +54397,229 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; - -exports[`ecmaFeatures fixtures/classes/named-class-expression.src 1`] = ` +exports[`javascript fixtures/destructuring/object-var-named.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, - "start": Object { - "column": 9, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 8, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 9, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "properties": Array [], + "range": Array [ + 12, + 14, + ], + "type": "ObjectExpression", }, - "range": Array [ - 9, - 11, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, - "name": "A", "range": Array [ - 7, - 8, + 4, + 14, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 1, - 11, - ], - "superClass": null, - "type": "ClassExpression", }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, "range": Array [ - 0, - 13, + 4, + 5, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { - "column": 0, + "column": 5, "line": 1, }, }, "range": Array [ - 0, - 1, + 5, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, 6, + 7, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -22901,25 +54637,25 @@ Object { 8, ], "type": "Identifier", - "value": "A", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 10, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { @@ -22937,40 +54673,58 @@ Object { 11, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -22980,85 +54734,127 @@ Object { } `; -exports[`ecmaFeatures fixtures/classes/named-derived-class-expression.src 1`] = ` +exports[`javascript fixtures/destructuring/object-var-undefined.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 7, + ], + "type": "ObjectPattern", }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "properties": Array [], + "range": Array [ + 10, + 12, + ], + "type": "ObjectExpression", }, - "name": "A", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 20, - ], - "superClass": Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 17, + "column": 4, "line": 1, }, }, "range": Array [ - 17, - 18, + 4, + 12, ], - "raw": "0", - "type": "Literal", - "value": 0, + "type": "VariableDeclarator", }, - "type": "ClassExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 1, }, "start": Object { @@ -23068,15 +54864,15 @@ Object { }, "range": Array [ 0, - 22, + 13, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 1, }, "start": Object { @@ -23086,14 +54882,14 @@ Object { }, "range": Array [ 0, - 22, + 13, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -23103,97 +54899,97 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 6, + 4, + 5, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, - 8, + 5, + 6, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 16, + 6, + 7, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "range": Array [ - 17, - 18, + 8, + 9, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, }, "start": Object { - "column": 18, + "column": 10, "line": 1, }, }, "range": Array [ - 18, - 19, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -23201,17 +54997,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 12, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 20, + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -23219,35 +55015,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, + "column": 13, "line": 1, }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ - 21, - 22, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -23257,203 +55035,146 @@ Object { } `; -exports[`ecmaFeatures fixtures/defaultParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-array.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 44, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 37, - 44, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 35, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "type": "AssignmentPattern", - }, - ], - "range": Array [ - 25, - 44, - ], - "type": "FunctionExpression", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, + "column": 21, "line": 1, }, }, "range": Array [ - 8, - 46, + 21, + 23, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "A", + "name": "a", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "ArrayPattern", + }, + ], "range": Array [ 0, - 46, + 23, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -23462,14 +55183,14 @@ Object { }, "range": Array [ 0, - 47, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -23479,115 +55200,97 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 25, - 26, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 26, - 29, + 12, + 13, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 29, - 30, + 14, + 15, ], "type": "Punctuator", "value": "=", @@ -23595,89 +55298,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 30, - 35, + 16, + 18, ], - "type": "String", - "value": "'bar'", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 35, - 36, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 37, - 38, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 43, - 44, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 45, - 46, + 22, + 23, ], "type": "Punctuator", "value": "}", @@ -23687,203 +55390,185 @@ Object { } `; -exports[`ecmaFeatures fixtures/defaultParams/class-method.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-object.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 36, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "type": "AssignmentPattern", - }, - ], - "range": Array [ - 17, - 36, - ], - "type": "FunctionExpression", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, + "column": 21, "line": 1, }, }, "range": Array [ - 8, - 38, + 21, + 23, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "A", + "name": "a", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, - }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 18, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 11, + 19, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ 0, - 38, + 23, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -23892,14 +55577,14 @@ Object { }, "range": Array [ 0, - 39, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -23909,115 +55594,97 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 17, - 18, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 18, - 21, + 12, + 13, ], "type": "Identifier", - "value": "bar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 21, - 22, + 14, + 15, ], "type": "Punctuator", "value": "=", @@ -24025,89 +55692,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 22, - 27, + 16, + 18, ], - "type": "String", - "value": "'baz'", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 2, + "line": 1, }, "start": Object { "column": 19, - "line": 2, + "line": 1, }, }, "range": Array [ - 29, - 30, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 35, - 36, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 37, - 38, + 22, + 23, ], "type": "Punctuator", "value": "}", @@ -24117,7 +55784,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/defaultParams/declaration.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-object-nested.src 1`] = ` Object { "body": Array [ Object { @@ -24126,17 +55793,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 20, + "column": 38, "line": 1, }, "start": Object { - "column": 18, + "column": 36, "line": 1, }, }, "range": Array [ - 18, - 20, + 36, + 38, ], "type": "BlockStatement", }, @@ -24153,7 +55820,7 @@ Object { "line": 1, }, }, - "name": "f", + "name": "a", "range": Array [ 9, 10, @@ -24162,7 +55829,7 @@ Object { }, "loc": Object { "end": Object { - "column": 20, + "column": 38, "line": 1, }, "start": Object { @@ -24172,27 +55839,9 @@ Object { }, "params": Array [ Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 16, + "column": 34, "line": 1, }, "start": Object { @@ -24200,43 +55849,287 @@ Object { "line": 1, }, }, - "range": Array [ - 11, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", }, - "start": Object { - "column": 15, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 18, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", }, }, - "range": Array [ - 15, - 16, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 20, + 33, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 25, + 31, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 23, + 33, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 11, + 34, + ], + "type": "ObjectPattern", }, ], "range": Array [ 0, - 20, + 38, ], "type": "FunctionDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "EmptyStatement", + }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 20, + "column": 39, "line": 1, }, "start": Object { @@ -24246,7 +56139,7 @@ Object { }, "range": Array [ 0, - 20, + 39, ], "sourceType": "module", "tokens": Array [ @@ -24284,7 +56177,7 @@ Object { 10, ], "type": "Identifier", - "value": "f", + "value": "a", }, Object { "loc": Object { @@ -24319,49 +56212,49 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 14, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { @@ -24371,10 +56264,10 @@ Object { }, "range": Array [ 16, - 17, + 18, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { @@ -24392,599 +56285,367 @@ Object { 19, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 21, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, 20, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/defaultParams/expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 22, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - }, - ], - "range": Array [ - 4, - 22, - ], - "type": "FunctionExpression", - }, - "type": "AssignmentExpression", - }, "loc": Object { "end": Object { "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, + 21, 22, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 24, "line": 1, }, "start": Object { - "column": 0, + "column": 23, "line": 1, }, }, "range": Array [ - 0, - 1, + 23, + 24, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 26, "line": 1, }, "start": Object { - "column": 2, + "column": 25, "line": 1, }, }, "range": Array [ - 2, - 3, + 25, + 26, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 28, "line": 1, }, "start": Object { - "column": 4, + "column": 27, "line": 1, }, }, "range": Array [ - 4, - 12, + 27, + 28, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 31, "line": 1, }, "start": Object { - "column": 12, + "column": 29, "line": 1, }, }, "range": Array [ - 12, - 13, + 29, + 31, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 33, "line": 1, }, "start": Object { - "column": 13, + "column": 32, "line": 1, }, }, "range": Array [ - 13, - 14, + 32, + 33, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 34, "line": 1, }, "start": Object { - "column": 15, + "column": 33, "line": 1, }, }, "range": Array [ - 15, - 16, + 33, + 34, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 35, "line": 1, }, "start": Object { - "column": 17, + "column": 34, "line": 1, }, }, "range": Array [ - 17, - 18, + 34, + 35, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 37, "line": 1, }, "start": Object { - "column": 18, + "column": 36, "line": 1, }, }, "range": Array [ - 18, - 19, + 36, + 37, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 38, "line": 1, }, "start": Object { - "column": 20, + "column": 37, "line": 1, }, }, "range": Array [ - 20, - 21, + 37, + 38, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 39, "line": 1, }, "start": Object { - "column": 21, + "column": 38, "line": 1, }, }, "range": Array [ - 21, - 22, + 38, + 39, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/defaultParams/method.src 1`] = ` +exports[`javascript fixtures/destructuring/params-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 27, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "operator": "=", + "name": "x", "range": Array [ - 0, - 27, + 9, + 10, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 25, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 13, "line": 1, }, }, - "method": false, - "range": Array [ - 6, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - }, - ], - "range": Array [ - 9, - 25, - ], - "type": "FunctionExpression", + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", }, ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, "range": Array [ - 4, - 27, + 11, + 19, ], - "type": "ObjectExpression", + "type": "ArrayPattern", }, - "type": "AssignmentExpression", - }, + ], + "range": Array [ + 0, + 22, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 27, + 22, + 23, ], - "type": "ExpressionStatement", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { @@ -24994,14 +56655,14 @@ Object { }, "range": Array [ 0, - 27, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -25011,118 +56672,118 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 10, "line": 1, }, "start": Object { - "column": 2, + "column": 9, "line": 1, }, }, "range": Array [ - 2, - 3, + 9, + 10, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, "range": Array [ - 6, - 7, + 11, + 12, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { - "column": 7, + "column": 13, "line": 1, }, }, "range": Array [ - 7, - 8, + 13, + 14, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 17, + 14, + 15, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ + 16, 17, - 18, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -25139,8 +56800,8 @@ Object { 18, 19, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -25158,7 +56819,7 @@ Object { 20, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { @@ -25175,8 +56836,8 @@ Object { 20, 21, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -25194,243 +56855,151 @@ Object { 22, ], "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - 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": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 22, "line": 1, }, }, "range": Array [ - 26, - 27, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/defaultParams/not-all-params.src 1`] = ` +exports[`javascript fixtures/destructuring/params-array-wrapped.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "expression": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "BlockStatement", + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "start": Object { + "column": 10, + "line": 1, }, - "params": Array [ + }, + "name": "x", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { - "column": 19, + "column": 14, "line": 1, }, }, "name": "a", "range": Array [ - 19, - 20, + 14, + 15, ], "type": "Identifier", }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "type": "AssignmentPattern", - }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { - "column": 30, + "column": 17, "line": 1, }, }, - "name": "c", + "name": "b", "range": Array [ - 30, - 31, + 17, + 18, ], "type": "Identifier", }, ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, "range": Array [ - 10, - 35, + 12, + 20, ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "type": "ArrayPattern", }, - "range": Array [ - 4, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 23, + ], + "type": "FunctionExpression", + }, "loc": Object { "end": Object { - "column": 36, + "column": 25, "line": 1, }, "start": Object { @@ -25440,15 +57009,15 @@ Object { }, "range": Array [ 0, - 36, + 25, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 36, + "column": 25, "line": 1, }, "start": Object { @@ -25458,14 +57027,14 @@ Object { }, "range": Array [ 0, - 36, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -25475,28 +57044,10 @@ Object { }, "range": Array [ 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, + 1, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -25505,21 +57056,21 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, "range": Array [ - 8, + 1, 9, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { @@ -25529,25 +57080,25 @@ Object { }, "range": Array [ 10, - 18, + 11, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", "value": "(", @@ -25555,197 +57106,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, "range": Array [ - 22, - 23, + 14, + 15, ], "type": "Identifier", - "value": "b", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, - "range": Array [ - 24, - 25, + "range": Array [ + 15, + 16, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 26, + "column": 17, "line": 1, }, }, "range": Array [ - 26, - 28, + 17, + 18, ], - "type": "Numeric", - "value": "42", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 20, "line": 1, }, "start": Object { - "column": 28, + "column": 19, "line": 1, }, }, "range": Array [ - 28, - 29, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 21, "line": 1, }, "start": Object { - "column": 30, + "column": 20, "line": 1, }, }, "range": Array [ - 30, - 31, + 20, + 21, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 22, "line": 1, }, "start": Object { - "column": 31, + "column": 21, "line": 1, }, }, "range": Array [ - 31, - 32, + 21, + 22, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 23, "line": 1, }, "start": Object { - "column": 33, + "column": 22, "line": 1, }, }, "range": Array [ - 33, - 34, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 24, "line": 1, }, "start": Object { - "column": 34, + "column": 23, "line": 1, }, }, "range": Array [ - 34, - 35, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 25, "line": 1, }, "start": Object { - "column": 35, + "column": 24, "line": 1, }, }, "range": Array [ - 35, - 36, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -25755,142 +57288,184 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/array-member.src 1`] = ` +exports[`javascript fixtures/destructuring/params-multi-object.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [ Object { "computed": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { + "key": Object { "loc": Object { "end": Object { - "column": 3, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 16, "line": 1, }, }, - "name": "ok", + "name": "b", "range": Array [ - 1, - 3, + 16, + 17, ], "type": "Identifier", }, - "property": Object { + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 5, + "column": 17, "line": 1, }, "start": Object { - "column": 4, + "column": 16, "line": 1, }, }, - "name": "v", + "name": "b", "range": Array [ - 4, - 5, + 16, + 17, ], "type": "Identifier", }, - "range": Array [ - 1, - 5, - ], - "type": "MemberExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, }, - }, - "range": Array [ - 0, - 6, ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, "range": Array [ - 9, - 11, + 14, + 19, ], - "raw": "20", - "type": "Literal", - "value": 20, + "type": "ObjectPattern", }, - "type": "AssignmentExpression", - }, + ], + "range": Array [ + 0, + 22, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 12, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 12, + 22, + 23, ], - "type": "ExpressionStatement", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -25899,14 +57474,14 @@ Object { }, "range": Array [ 0, - 12, + 24, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -25916,133 +57491,205 @@ Object { }, "range": Array [ 0, - 1, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 11, "line": 1, }, }, "range": Array [ - 1, - 3, + 11, + 12, ], "type": "Identifier", - "value": "ok", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 13, "line": 1, }, "start": Object { - "column": 3, + "column": 12, "line": 1, }, }, "range": Array [ - 3, - 4, + 12, + 13, ], "type": "Punctuator", - "value": ".", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 15, "line": 1, }, "start": Object { - "column": 4, + "column": 14, "line": 1, }, }, "range": Array [ - 4, - 5, + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, ], "type": "Identifier", - "value": "v", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 19, "line": 1, }, "start": Object { - "column": 5, + "column": 18, "line": 1, }, }, "range": Array [ - 5, - 6, + 18, + 19, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 7, + "column": 19, "line": 1, }, }, "range": Array [ - 7, - 8, + 19, + 20, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 21, "line": 1, }, "start": Object { - "column": 9, + "column": 20, "line": 1, }, }, "range": Array [ - 9, - 11, + 20, + 21, ], - "type": "Numeric", - "value": "20", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 21, "line": 1, }, }, "range": Array [ - 11, - 12, + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -26052,159 +57699,165 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/array-to-array.src 1`] = ` +exports[`javascript fixtures/destructuring/params-nested-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", }, + "range": Array [ + 25, + 27, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "operator": "=", + "name": "a", "range": Array [ - 0, - 15, + 9, + 10, ], - "right": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "elements": Array [ Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, - "name": "b", + "name": "x", "range": Array [ - 10, - 11, + 12, + 13, ], "type": "Identifier", }, + null, Object { + "elements": Array [ + null, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + ], "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, - "name": "a", "range": Array [ - 13, - 14, + 17, + 22, ], - "type": "Identifier", + "type": "ArrayPattern", }, ], "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 15, + 11, + 23, ], - "type": "ArrayExpression", + "type": "ArrayPattern", }, - "type": "AssignmentExpression", - }, + ], + "range": Array [ + 0, + 27, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { - "column": 0, + "column": 27, "line": 1, }, }, "range": Array [ - 0, - 16, + 27, + 28, ], - "type": "ExpressionStatement", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { @@ -26214,14 +57867,14 @@ Object { }, "range": Array [ 0, - 16, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -26231,25 +57884,25 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, "range": Array [ - 1, - 2, + 9, + 10, ], "type": "Identifier", "value": "a", @@ -26257,89 +57910,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 11, "line": 1, }, "start": Object { - "column": 2, + "column": 10, "line": 1, }, }, "range": Array [ - 2, - 3, + 10, + 11, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 12, "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, - 5, + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, ], "type": "Identifier", - "value": "b", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 14, "line": 1, }, "start": Object { - "column": 5, + "column": 13, "line": 1, }, }, "range": Array [ - 5, - 6, + 13, + 14, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, "range": Array [ - 7, - 8, + 15, + 16, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", "value": "[", @@ -26347,89 +58018,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Identifier", - "value": "b", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 21, "line": 1, }, }, "range": Array [ - 11, - 12, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 22, "line": 1, }, }, "range": Array [ - 13, - 14, + 22, + 23, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 24, "line": 1, }, "start": Object { - "column": 14, + "column": 23, "line": 1, }, }, "range": Array [ - 14, - 15, + 23, + 24, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { - "column": 15, + "column": 25, "line": 1, }, }, "range": Array [ - 15, - 16, + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -26439,106 +58164,280 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/array-var-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring/params-nested-object.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { - "elements": Array [ - Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 13, "line": 1, }, "start": Object { - "column": 5, + "column": 12, "line": 1, }, }, - "name": "a", + "name": "x", "range": Array [ - 5, - 6, + 12, + 13, ], "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, - "start": Object { - "column": 4, - "line": 1, + "method": false, + "range": Array [ + 12, + 16, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", }, }, - "range": Array [ - 4, - 7, - ], - "type": "ArrayPattern", - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", }, - "start": Object { - "column": 10, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 29, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 23, + 27, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 21, + 29, + ], + "type": "ObjectPattern", }, }, - "range": Array [ - 10, - 12, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, + ], "range": Array [ - 4, - 12, + 11, + 31, ], - "type": "VariableDeclarator", + "type": "ObjectPattern", }, ], - "kind": "var", + "range": Array [ + 0, + 35, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 13, + "column": 36, "line": 1, }, "start": Object { - "column": 0, + "column": 35, "line": 1, }, }, "range": Array [ - 0, - 13, + 35, + 36, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 13, + "column": 36, "line": 1, }, "start": Object { @@ -26548,14 +58447,14 @@ Object { }, "range": Array [ 0, - 13, + 36, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -26565,43 +58464,25 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 6, + 9, + 10, ], "type": "Identifier", "value": "a", @@ -26609,358 +58490,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 11, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 9, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, "range": Array [ - 10, - 11, + 12, + 13, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 12, + 13, + 14, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, "range": Array [ - 12, - 13, + 15, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "y", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/class-constructor-params-array.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 45, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 45, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 36, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, - 47, + 16, + 17, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 5, + 18, + 19, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 6, + "column": 19, "line": 1, }, }, "range": Array [ - 6, - 7, + 19, + 20, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 22, "line": 1, }, "start": Object { - "column": 8, + "column": 21, "line": 1, }, }, "range": Array [ - 8, - 9, + 21, + 22, ], "type": "Punctuator", "value": "{", @@ -26968,84 +58652,84 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 14, - 25, + 23, + 24, ], "type": "Identifier", - "value": "consturctor", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ 26, 27, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 27, - 30, + 28, + 29, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ @@ -27053,76 +58737,40 @@ Object { 31, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ + 31, 32, - 35, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, ], "type": "Punctuator", "value": ")", }, Object { "loc": Object { - "end": Object { - "column": 29, - "line": 2, + "end": Object { + "column": 34, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 38, - 39, + 33, + 34, ], "type": "Punctuator", "value": "{", @@ -27130,17 +58778,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ - 44, - 45, + 34, + 35, ], "type": "Punctuator", "value": "}", @@ -27148,312 +58796,72 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 36, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 35, + "line": 1, }, }, "range": Array [ - 46, - 47, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/params-object.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 40, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 25, - 49, - ], - "type": "FunctionExpression", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, + "column": 20, "line": 1, }, }, "range": Array [ - 8, - 51, + 20, + 22, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "A", + "name": "x", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { @@ -27461,261 +58869,340 @@ Object { "line": 1, }, }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 11, + 19, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 14, - 25, ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, "range": Array [ - 25, - 26, + 0, + 22, ], - "type": "Punctuator", - "value": "(", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 26, - 27, + 22, + 23, ], - "type": "Punctuator", - "value": "[", + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 27, - 30, + 0, + 8, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 30, - 31, + 9, + 10, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 31, - 32, + 10, + 11, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 32, - 33, + 11, + 12, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 34, - 37, + 13, + 14, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 37, - 38, + 14, + 15, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 38, - 39, + 16, + 17, ], - "type": "Numeric", - "value": "4", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 39, - 40, + 18, + 19, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 30, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 40, - 41, + 19, + 20, ], "type": "Punctuator", "value": ")", @@ -27723,391 +59210,261 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 42, - 43, + 20, + 21, ], "type": "Punctuator", "value": "{", }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/class-constructor-params-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 27, - 32, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 34, - 39, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 26, - 40, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 25, - 49, - ], - "type": "FunctionExpression", + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-object-wrapped.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", }, - "range": Array [ - 8, - 51, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 23, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, - "name": "A", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 14, + 15, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 17, + 18, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 12, + 20, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ - 6, - 7, + 1, + 23, ], - "type": "Identifier", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 25, + "line": 1, }, "start": Object { "column": 0, @@ -28116,17 +59473,16 @@ Object { }, "range": Array [ 0, - 51, + 25, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 25, + "line": 1, }, "start": Object { "column": 0, @@ -28135,14 +59491,14 @@ Object { }, "range": Array [ 0, - 52, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -28152,43 +59508,79 @@ Object { }, "range": Array [ 0, - 5, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 11, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 9, + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, ], "type": "Punctuator", "value": "{", @@ -28197,534 +59589,552 @@ Object { "loc": Object { "end": Object { "column": 15, - "line": 2, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ 14, - 25, + 15, ], "type": "Identifier", - "value": "consturctor", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 2, + "line": 1, }, "start": Object { "column": 15, - "line": 2, + "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { "column": 17, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 26, - 27, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { "column": 20, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/sparse-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + null, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - "start": Object { - "column": 20, - "line": 2, + "operator": "=", + "range": Array [ + 0, + 14, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "array", + "range": Array [ + 9, + 14, + ], + "type": "Identifier", }, + "type": "AssignmentExpression", }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "=", - }, - Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 31, - 32, + 0, + 15, ], - "type": "Numeric", - "value": "3", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 32, - 33, + 0, + 1, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 2, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 34, - 37, + 1, + 2, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 2, + "line": 1, }, }, "range": Array [ - 37, - 38, + 2, + 3, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 38, - 39, + 3, + 4, ], - "type": "Numeric", - "value": "4", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 39, - 40, + 4, + 5, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 30, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 40, - 41, + 5, + 6, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 42, - 43, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 48, - 49, + 9, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "array", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 14, + "line": 1, }, }, "range": Array [ - 50, - 51, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-constructor-params-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 9, + "line": 1, }, - "range": Array [ - 14, - 45, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 2, + "line": 1, }, }, + "name": "y", "range": Array [ - 38, - 45, + 2, + 3, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, + ], + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 27, - 30, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 32, - 35, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 26, - 36, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "FunctionExpression", }, + "range": Array [ + 1, + 4, + ], + "type": "ArrayPattern", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 10, ], - "type": "Identifier", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { "column": 0, @@ -28733,17 +60143,16 @@ Object { }, "range": Array [ 0, - 47, + 11, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { "column": 0, @@ -28752,14 +60161,14 @@ Object { }, "range": Array [ 0, - 48, + 11, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -28769,187 +60178,79 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, + 2, + 3, ], "type": "Identifier", - "value": "bar", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 35, - 36, + 3, + 4, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 36, - 37, + 4, + 5, ], "type": "Punctuator", "value": ")", @@ -28957,241 +60258,185 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 38, - 39, + 6, + 8, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 44, - 45, + 9, + 10, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 46, - 47, + 10, + 11, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-method-params-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 14, - 37, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 2, + "line": 1, }, }, + "name": "y", "range": Array [ - 30, - 37, + 2, + 3, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, + "type": "Identifier", }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "start": Object { + "column": 6, + "line": 1, }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 18, - 28, - ], - "type": "ArrayPattern", }, - ], - "range": Array [ - 17, - 37, - ], - "type": "FunctionExpression", + "range": Array [ + 5, + 8, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, }, + "range": Array [ + 1, + 9, + ], + "type": "ArrayPattern", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 15, ], - "type": "Identifier", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { "column": 0, @@ -29200,17 +60445,16 @@ Object { }, "range": Array [ 0, - 39, + 16, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { "column": 0, @@ -29219,14 +60463,14 @@ Object { }, "range": Array [ 0, - 40, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -29236,97 +60480,79 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, + 1, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 2, "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, "range": Array [ - 8, - 9, + 1, + 2, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 1, }, }, "range": Array [ - 14, - 17, + 2, + 3, ], "type": "Identifier", - "value": "foo", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 17, - 18, + 3, + 4, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 18, - 19, + 5, + 6, ], "type": "Punctuator", "value": "[", @@ -29334,71 +60560,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 19, - 22, + 6, + 7, ], "type": "Identifier", - "value": "bar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 8, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "baz", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 27, - 28, + 8, + 9, ], "type": "Punctuator", "value": "]", @@ -29406,17 +60614,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 28, - 29, + 9, + 10, ], "type": "Punctuator", "value": ")", @@ -29424,313 +60632,302 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 30, - 31, + 11, + 13, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 36, - 37, + 14, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 38, - 39, + 15, + 16, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "kind": "method", + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 1, }, }, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 2, + "line": 1, }, }, + "method": false, "range": Array [ - 34, - 41, + 2, + 3, ], - "type": "BlockStatement", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "start": Object { - "column": 7, - "line": 2, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", + "method": false, + "range": Array [ + 5, + 10, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, + }, + "properties": Array [ Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, }, - "name": "baz", + "name": "x", "range": Array [ - 26, - 29, + 8, + 9, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, }, + "method": false, "range": Array [ - 26, - 31, + 8, + 9, ], - "right": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 8, + "line": 1, }, }, + "name": "x", "range": Array [ - 30, - 31, + 8, + 9, ], - "raw": "4", - "type": "Literal", - "value": 4, + "type": "Identifier", }, - "type": "AssignmentPattern", }, ], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, "range": Array [ - 18, - 32, + 7, + 10, ], - "type": "ArrayPattern", + "type": "ObjectPattern", }, - ], - "range": Array [ - 17, - 41, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + }, + ], + "range": Array [ + 1, + 11, + ], + "type": "ObjectPattern", }, - }, - "name": "A", + ], "range": Array [ - 6, - 7, + 0, + 17, ], - "type": "Identifier", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 18, + "line": 1, }, "start": Object { "column": 0, @@ -29739,17 +60936,16 @@ Object { }, "range": Array [ 0, - 43, + 18, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 18, + "line": 1, }, "start": Object { "column": 0, @@ -29758,14 +60954,14 @@ Object { }, "range": Array [ 0, - 44, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -29775,43 +60971,25 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, + 1, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 2, "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, "range": Array [ - 8, - 9, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -29819,215 +60997,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 1, }, }, "range": Array [ - 14, - 17, + 2, + 3, ], "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 18, - 19, + 3, + 4, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 19, - 22, + 5, + 6, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 22, - 23, + 6, + 7, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "3", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 24, - 25, + 7, + 8, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 26, - 29, + 8, + 9, ], "type": "Identifier", - "value": "baz", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 29, - 30, + 9, + 10, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Numeric", - "value": "4", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 31, - 32, + 10, + 11, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 32, - 33, + 11, + 12, ], "type": "Punctuator", "value": ")", @@ -30035,391 +61159,302 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 34, - 35, + 13, + 15, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 40, - 41, + 16, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 18, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 17, + "line": 1, }, }, "range": Array [ - 42, - 43, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-method-params-defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, - "kind": "method", + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 1, }, }, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 2, + "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 19, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, + "name": "foo", + "range": Array [ + 2, + 5, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 8, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 20, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, }, + }, + "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, - "name": "baz", + "name": "bar", "range": Array [ - 26, - 29, + 13, + 16, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, "method": false, "range": Array [ - 26, - 31, + 13, + 19, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 18, + "line": 1, }, }, + "name": "x", "range": Array [ - 26, - 31, + 18, + 19, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", + "type": "Identifier", }, }, ], "range": Array [ - 18, - 32, + 12, + 20, ], "type": "ObjectPattern", }, - ], - "range": Array [ - 17, - 41, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, + }, + ], + "range": Array [ + 1, + 21, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 43, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 27, ], - "type": "Identifier", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -30428,17 +61463,16 @@ Object { }, "range": Array [ 0, - 43, + 28, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -30447,14 +61481,14 @@ Object { }, "range": Array [ 0, - 44, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -30464,241 +61498,241 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, "range": Array [ - 8, - 9, + 2, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 14, - 17, + 5, + 6, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 2, + "line": 1, }, "start": Object { "column": 7, - "line": 2, + "line": 1, }, }, "range": Array [ - 17, - 18, + 7, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 1, }, "start": Object { "column": 8, - "line": 2, + "line": 1, }, }, "range": Array [ - 18, - 19, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 19, - 22, + 10, + 11, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 23, - 24, + 12, + 13, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 24, - 25, + 13, + 16, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { "column": 16, - "line": 2, + "line": 1, }, }, "range": Array [ - 26, - 29, + 16, + 17, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 29, - 30, + 18, + 19, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 30, - 31, + 19, + 20, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 31, - 32, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -30706,17 +61740,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 32, - 33, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -30725,318 +61759,186 @@ Object { "loc": Object { "end": Object { "column": 25, - "line": 2, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 34, - 35, + 23, + 25, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 40, - 41, + 26, + 27, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 27, + "line": 1, }, }, "range": Array [ - 42, - 43, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/class-method-params-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "kind": "method", + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 1, }, }, - "range": Array [ - 14, - 37, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 2, + "line": 1, }, }, + "method": false, "range": Array [ - 30, - 37, + 2, + 3, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 2, + "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 24, - 27, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - }, - ], + "name": "y", "range": Array [ - 18, - 28, + 2, + 3, ], - "type": "ObjectPattern", + "type": "Identifier", }, - ], - "range": Array [ - 17, - 37, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, + }, + ], + "range": Array [ + 1, + 4, + ], + "type": "ObjectPattern", }, - }, - "range": Array [ - 8, - 39, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 10, ], - "type": "Identifier", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { "column": 0, @@ -31045,17 +61947,16 @@ Object { }, "range": Array [ 0, - 39, + 11, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { "column": 0, @@ -31064,14 +61965,14 @@ Object { }, "range": Array [ 0, - 40, + 11, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -31081,331 +61982,491 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, ], "type": "Identifier", - "value": "A", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, "line": 1, }, "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { "column": 8, "line": 1, }, + "start": Object { + "column": 6, + "line": 1, + }, }, "range": Array [ + 6, 8, - 9, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 14, - 17, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 8, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 15, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 15, ], - "type": "Punctuator", - "value": "(", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 1, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 2, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 19, - 22, + 1, + 2, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 2, + "line": 1, }, }, "range": Array [ - 22, - 23, + 2, + 3, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 24, - 27, + 4, + 5, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 27, - 28, + 6, + 8, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 28, - 29, + 8, + 9, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 30, - 31, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 36, - 37, + 11, + 13, ], "type": "Punctuator", - "value": "}", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 14, + "line": 1, }, }, "range": Array [ - 38, - 39, + 14, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "left": Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - ], + "async": false, + "body": Object { "loc": Object { "end": Object { - "column": 6, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, + "name": "x", "range": Array [ - 0, - 6, + 14, + 15, ], - "type": "ArrayPattern", + "type": "Identifier", }, + "expression": true, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -31413,34 +62474,129 @@ Object { "line": 1, }, }, - "operator": "=", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 8, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 1, + 9, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ 0, - 10, + 15, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -31450,7 +62606,7 @@ Object { }, "range": Array [ 0, - 10, + 15, ], "type": "ExpressionStatement", }, @@ -31458,7 +62614,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -31468,7 +62624,7 @@ Object { }, "range": Array [ 0, - 10, + 15, ], "sourceType": "module", "tokens": Array [ @@ -31488,7 +62644,7 @@ Object { 1, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { @@ -31505,8 +62661,8 @@ Object { 1, 2, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -31523,8 +62679,8 @@ Object { 2, 3, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -31533,52 +62689,52 @@ Object { "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, + 4, 5, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "range": Array [ - 5, 6, + 8, ], - "type": "Punctuator", - "value": "]", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { @@ -31586,249 +62742,407 @@ Object { "column": 10, "line": 1, }, - "start": Object { - "column": 9, - "line": 1, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "x", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "ArrayExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/defaults-array-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { - "column": 5, + "column": 2, "line": 1, }, }, "name": "x", "range": Array [ - 5, - 6, + 2, + 3, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 2, "line": 1, }, }, + "method": false, "range": Array [ - 5, - 11, + 2, + 8, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "left": Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 2, "line": 1, }, }, - "name": "y", "range": Array [ - 13, - 14, + 2, + 8, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, + "type": "AssignmentPattern", }, - "type": "AssignmentPattern", }, Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 10, "line": 1, }, }, - "name": "z", + "name": "y", "range": Array [ - 20, - 21, + 10, + 11, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { - "column": 20, + "column": 10, "line": 1, }, }, + "method": false, "range": Array [ - 20, - 25, + 10, + 23, ], - "right": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], "range": Array [ - 24, - 25, + 13, + 23, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "ObjectPattern", }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, }, - }, - "range": Array [ - 4, - 26, ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "a", "range": Array [ - 29, - 30, + 1, + 24, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "type": "ObjectPattern", }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 0, + 35, + ], + "type": "ArrowFunctionExpression", + }, "loc": Object { "end": Object { - "column": 31, + "column": 35, "line": 1, }, "start": Object { @@ -31838,15 +63152,15 @@ Object { }, "range": Array [ 0, - 31, + 35, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, + "column": 35, "line": 1, }, "start": Object { @@ -31856,14 +63170,14 @@ Object { }, "range": Array [ 0, - 31, + 35, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -31873,10 +63187,46 @@ Object { }, "range": Array [ 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, 3, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -31894,43 +63244,43 @@ Object { 5, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "range": Array [ - 5, 6, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { @@ -31939,16 +63289,16 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, + 10, 11, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -31966,7 +63316,7 @@ Object { 12, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { @@ -31983,8 +63333,8 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -32001,8 +63351,8 @@ Object { 15, 16, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { @@ -32019,487 +63369,276 @@ Object { 17, 18, ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], "type": "Numeric", - "value": "5", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 24, "line": 1, }, "start": Object { - "column": 18, + "column": 23, "line": 1, }, }, "range": Array [ - 18, - 19, + 23, + 24, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 20, + "column": 24, "line": 1, }, }, "range": Array [ - 20, - 21, + 24, + 25, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 28, "line": 1, }, "start": Object { - "column": 22, + "column": 26, "line": 1, }, }, "range": Array [ - 22, - 23, + 26, + 28, ], "type": "Punctuator", - "value": "=", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 24, + "column": 29, "line": 1, }, }, "range": Array [ - 24, - 25, + 29, + 30, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 31, "line": 1, }, "start": Object { - "column": 25, + "column": 30, "line": 1, }, }, "range": Array [ - 25, - 26, + 30, + 31, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 32, "line": 1, }, "start": Object { - "column": 27, + "column": 31, "line": 1, }, }, "range": Array [ - 27, - 28, + 31, + 32, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 34, "line": 1, }, "start": Object { - "column": 29, + "column": 33, "line": 1, }, }, "range": Array [ - 29, - 30, + 33, + 34, ], "type": "Identifier", - "value": "a", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 35, "line": 1, }, "start": Object { - "column": 30, + "column": 34, "line": 1, }, }, "range": Array [ - 30, - 31, + 34, + 35, ], "type": "Punctuator", - "value": ";", + "value": "]", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ + "elements": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ - 5, - 9, + 7, + 8, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 11, - 15, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 17, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 22, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 20, - 32, - ], - "type": "ObjectPattern", - }, + "start": Object { + "column": 6, + "line": 1, }, - ], + }, "range": Array [ - 4, - 34, + 6, + 9, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "init": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 38, + "column": 14, "line": 1, }, "start": Object { - "column": 37, + "column": 12, "line": 1, }, }, - "name": "b", "range": Array [ - 37, - 38, + 12, + 14, ], - "type": "Identifier", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 38, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 38, + 6, + 14, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 39, + "column": 15, "line": 1, }, "start": Object { @@ -32509,7 +63648,7 @@ Object { }, "range": Array [ 0, - 39, + 15, ], "type": "VariableDeclaration", }, @@ -32517,7 +63656,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 39, + "column": 15, "line": 1, }, "start": Object { @@ -32527,420 +63666,412 @@ Object { }, "range": Array [ 0, - 39, + 15, ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 12, + 0, + 5, ], - "type": "Identifier", - "value": "y", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { - "column": 12, + "column": 6, "line": 1, }, }, "range": Array [ - 12, - 13, + 6, + 7, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 8, "line": 1, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, "range": Array [ - 14, - 15, + 7, + 8, ], "type": "Identifier", - "value": "y", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 16, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 10, "line": 1, }, }, "range": Array [ - 17, - 18, + 10, + 11, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "line": 1, }, }, "range": Array [ - 18, - 19, + 12, + 13, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, "range": Array [ - 22, - 23, + 14, + 15, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "ArrayPattern", + }, + "init": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 24, + "column": 13, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 13, ], - "type": "Punctuator", - "value": ":", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 26, + "column": 3, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 3, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 5, "line": 1, }, "start": Object { - "column": 27, + "column": 4, "line": 1, }, }, "range": Array [ - 27, - 28, + 4, + 5, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 6, "line": 1, }, "start": Object { - "column": 29, + "column": 5, "line": 1, }, }, "range": Array [ - 29, - 31, + 5, + 6, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 7, "line": 1, }, "start": Object { - "column": 31, + "column": 6, "line": 1, }, }, "range": Array [ - 31, - 32, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 9, "line": 1, }, "start": Object { - "column": 33, + "column": 8, "line": 1, }, }, "range": Array [ - 33, - 34, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 11, "line": 1, }, "start": Object { - "column": 35, + "column": 10, "line": 1, }, }, "range": Array [ - 35, - 36, + 10, + 11, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 12, "line": 1, }, "start": Object { - "column": 37, + "column": 11, "line": 1, }, }, "range": Array [ - 37, - 38, + 11, + 12, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 13, "line": 1, }, "start": Object { - "column": 38, + "column": 12, "line": 1, }, }, "range": Array [ - 38, - 39, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -32950,51 +64081,66 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-array-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-named.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "properties": Array [ Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ - 5, - 6, + 7, + 8, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, + "method": false, "range": Array [ - 5, - 11, + 7, + 10, ], - "right": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { @@ -33002,108 +64148,60 @@ Object { "line": 1, }, }, + "name": "b", "range": Array [ 9, - 11, + 10, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "type": "Identifier", }, - "name": "z", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", }, ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, "range": Array [ - 4, - 18, + 6, + 11, ], - "type": "ArrayPattern", + "type": "ObjectPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 14, "line": 1, }, }, - "name": "a", + "properties": Array [], "range": Array [ - 21, - 22, + 14, + 16, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 22, + 6, + 16, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { @@ -33113,7 +64211,7 @@ Object { }, "range": Array [ 0, - 23, + 17, ], "type": "VariableDeclaration", }, @@ -33121,7 +64219,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { @@ -33131,14 +64229,14 @@ Object { }, "range": Array [ 0, - 23, + 17, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -33148,46 +64246,28 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "var", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { "column": 6, "line": 1, }, - "start": Object { - "column": 5, - "line": 1, - }, }, "range": Array [ - 5, 6, + 7, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -33204,167 +64284,131 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { "column": 9, "line": 1, }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 12, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 14, + 9, + 10, ], "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 13, "line": 1, }, "start": Object { - "column": 17, + "column": 12, "line": 1, }, }, "range": Array [ - 17, - 18, + 12, + 13, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { - "column": 19, + "column": 14, "line": 1, }, }, "range": Array [ - 19, - 20, + 14, + 15, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 16, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -33374,197 +64418,127 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-array-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-undefined.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "properties": Array [ Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ - 5, - 6, + 7, + 8, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, + "method": false, "range": Array [ - 5, - 11, + 7, + 8, ], - "right": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, + "name": "a", "range": Array [ - 9, - 11, + 7, + 8, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "Identifier", }, - "range": Array [ - 13, - 22, - ], - "type": "ArrayPattern", }, ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, "range": Array [ - 4, - 23, + 6, + 9, ], - "type": "ArrayPattern", + "type": "ObjectPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 27, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 12, "line": 1, }, }, - "name": "a", + "properties": Array [], "range": Array [ - 26, - 27, + 12, + 14, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 27, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 27, + 6, + 14, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 1, }, "start": Object { @@ -33574,7 +64548,7 @@ Object { }, "range": Array [ 0, - 28, + 15, ], "type": "VariableDeclaration", }, @@ -33582,7 +64556,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 1, }, "start": Object { @@ -33592,14 +64566,14 @@ Object { }, "range": Array [ 0, - 28, + 15, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -33609,64 +64583,64 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "var", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 5, + 6, + 7, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, "range": Array [ - 5, - 6, + 7, + 8, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { @@ -33675,34 +64649,34 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, + 10, 11, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { @@ -33720,148 +64694,22 @@ Object { 14, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { "column": 15, "line": 1, }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "]", - }, - 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": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, "start": Object { - "column": 27, + "column": 14, "line": 1, }, }, "range": Array [ - 27, - 28, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -33871,16 +64719,27 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ Object { - "left": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { "column": 6, @@ -33891,16 +64750,17 @@ Object { "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ 5, 6, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { @@ -33908,106 +64768,60 @@ Object { "line": 1, }, }, + "method": false, "range": Array [ 5, - 11, + 8, ], - "right": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, + "name": "b", "range": Array [ - 9, - 11, + 7, + 8, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "Identifier", }, - "range": Array [ - 13, - 18, - ], - "type": "ArrayPattern", }, ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, "range": Array [ 4, - 19, + 9, ], - "type": "ArrayPattern", + "type": "ObjectPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 12, "line": 1, }, }, - "name": "a", + "properties": Array [], "range": Array [ - 22, - 23, + 12, + 14, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { @@ -34017,15 +64831,15 @@ Object { }, "range": Array [ 4, - 23, + 14, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "let", "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { @@ -34035,7 +64849,7 @@ Object { }, "range": Array [ 0, - 24, + 15, ], "type": "VariableDeclaration", }, @@ -34043,7 +64857,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { @@ -34053,7 +64867,7 @@ Object { }, "range": Array [ 0, - 24, + 15, ], "sourceType": "module", "tokens": Array [ @@ -34073,7 +64887,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "let", }, Object { "loc": Object { @@ -34091,7 +64905,7 @@ Object { 5, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { @@ -34109,184 +64923,130 @@ Object { 6, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { "column": 7, "line": 1, }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, "start": Object { - "column": 13, + "column": 6, "line": 1, }, }, "range": Array [ - 13, - 14, + 6, + 7, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, "range": Array [ - 15, - 16, + 7, + 8, ], "type": "Identifier", - "value": "z", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "range": Array [ - 17, - 18, + 8, + 9, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, }, "start": Object { - "column": 18, + "column": 10, "line": 1, }, }, "range": Array [ - 18, - 19, + 10, + 11, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 13, "line": 1, }, }, "range": Array [ - 22, - 23, + 13, + 14, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, "range": Array [ - 23, - 24, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -34296,7 +65056,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -34305,7 +65065,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 12, + "column": 7, "line": 1, }, "start": Object { @@ -34327,7 +65087,7 @@ Object { "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ 5, 6, @@ -34337,7 +65097,7 @@ Object { "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { @@ -34348,32 +65108,14 @@ Object { "method": false, "range": Array [ 5, - 11, + 6, ], "shorthand": true, "type": "Property", "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { @@ -34381,60 +65123,42 @@ Object { "line": 1, }, }, + "name": "a", "range": Array [ 5, - 11, + 6, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", + "type": "Identifier", }, }, ], "range": Array [ 4, - 12, + 7, ], "type": "ObjectPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, - "name": "x", + "properties": Array [], "range": Array [ - 15, - 16, + 10, + 12, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { @@ -34444,15 +65168,15 @@ Object { }, "range": Array [ 4, - 16, + 12, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "let", "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { @@ -34462,7 +65186,7 @@ Object { }, "range": Array [ 0, - 16, + 13, ], "type": "VariableDeclaration", }, @@ -34470,7 +65194,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { @@ -34480,7 +65204,7 @@ Object { }, "range": Array [ 0, - 16, + 13, ], "sourceType": "module", "tokens": Array [ @@ -34500,7 +65224,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "let", }, Object { "loc": Object { @@ -34536,464 +65260,278 @@ Object { 6, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 8, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 11, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ + 10, 11, - 12, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 13, + "column": 11, "line": 1, }, }, "range": Array [ - 13, - 14, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, "range": Array [ - 15, - 16, + 12, + 13, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-all.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 13, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentPattern", - }, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "elements": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 25, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, - "method": false, + "name": "x", "range": Array [ - 20, - 25, + 12, + 13, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - }, + "type": "Identifier", }, ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - }, - "init": Object { "loc": Object { "end": Object { - "column": 30, + "column": 14, "line": 1, }, "start": Object { - "column": 29, + "column": 11, "line": 1, }, }, - "name": "a", "range": Array [ - 29, - 30, + 11, + 14, ], - "type": "Identifier", + "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 30, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, - 30, + 11, + 20, ], - "type": "VariableDeclarator", + "right": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", }, ], - "kind": "var", + "range": Array [ + 0, + 24, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 31, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 31, + 24, + 25, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, + "column": 25, "line": 1, }, "start": Object { @@ -35003,14 +65541,14 @@ Object { }, "range": Array [ 0, - 31, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -35020,100 +65558,82 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 6, + 9, + 10, ], "type": "Identifier", - "value": "x", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 10, "line": 1, }, }, "range": Array [ - 7, - 8, + 10, + 11, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, 11, + 12, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -35130,8 +65650,8 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -35166,8 +65686,8 @@ Object { 17, 18, ], - "type": "Numeric", - "value": "5", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { @@ -35184,131 +65704,95 @@ Object { 18, 19, ], - "type": "Punctuator", - "value": ",", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { "column": 20, "line": 1, }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "1", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 20, "line": 1, }, }, "range": Array [ - 25, - 26, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 23, "line": 1, }, "start": Object { - "column": 27, + "column": 22, "line": 1, }, }, "range": Array [ - 27, - 28, + 22, + 23, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 24, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, "range": Array [ - 29, - 30, + 23, + 24, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 25, "line": 1, }, "start": Object { - "column": 30, + "column": 24, "line": 1, }, }, "range": Array [ - 30, - 31, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -35318,163 +65802,260 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-longform.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 30, + ], + "right": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { - "column": 4, + "column": 28, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "range": Array [ + 28, + 30, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", }, - "start": Object { - "column": 6, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 14, + 15, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", }, }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", + ], + "range": Array [ + 13, + 16, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, }, - "kind": "init", + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 26, + ], + "right": Object { "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { - "column": 6, + "column": 19, "line": 1, }, }, - "method": false, - "range": Array [ - 6, - 15, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "right": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 15, + "column": 25, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, + "method": false, "range": Array [ - 13, - 15, + 20, + 25, ], - "raw": "10", - "type": "Literal", - "value": 10, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 4, - 17, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, + ], + "range": Array [ + 19, + 26, + ], + "type": "ObjectExpression", }, + "type": "AssignmentPattern", }, - "name": "x", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, + ], "range": Array [ 4, - 21, + 30, ], - "type": "VariableDeclarator", + "type": "FunctionExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { @@ -35484,15 +66065,15 @@ Object { }, "range": Array [ 0, - 22, + 31, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { @@ -35502,14 +66083,14 @@ Object { }, "range": Array [ 0, - 22, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -35519,154 +66100,154 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { - "column": 4, + "column": 2, "line": 1, }, }, "range": Array [ - 4, - 5, + 2, + 3, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 12, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "range": Array [ - 7, - 8, + 12, + 13, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, - 10, + 13, + 14, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { - "column": 11, + "column": 14, "line": 1, }, }, "range": Array [ - 11, - 12, + 14, + 15, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, 15, + 16, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 20, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 20, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { @@ -35702,6 +66283,114 @@ Object { 22, ], "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", "value": ";", }, ], @@ -35709,349 +66398,282 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-longform-all.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "expression": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, }, - "method": false, - "range": Array [ - 5, - 14, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", + "start": Object { + "column": 2, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + "name": "f", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": true, + "range": Array [ + 2, + 21, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 25, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 19, "line": 1, }, }, - "method": false, "range": Array [ - 16, - 25, + 19, + 21, ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 27, - 28, - ], - "type": "Identifier", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, + "start": Object { + "column": 3, + "line": 1, }, - "method": false, - "range": Array [ - 27, - 36, - ], - "shorthand": false, - "type": "Property", - "value": Object { + }, + "params": Array [ + Object { "left": Object { "loc": Object { "end": Object { - "column": 31, + "column": 7, "line": 1, }, "start": Object { - "column": 30, + "column": 4, "line": 1, }, }, - "name": "z", + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + ], "range": Array [ - 30, - 31, + 4, + 7, ], - "type": "Identifier", + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 36, + "column": 17, "line": 1, }, "start": Object { - "column": 30, + "column": 4, "line": 1, }, }, "range": Array [ - 30, - 36, + 4, + 17, ], "right": Object { "loc": Object { "end": Object { - "column": 36, + "column": 17, "line": 1, }, "start": Object { - "column": 34, + "column": 10, "line": 1, }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 11, + 16, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + }, + ], "range": Array [ - 34, - 36, + 10, + 17, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "ObjectExpression", }, "type": "AssignmentPattern", }, - }, - ], - "range": Array [ - 4, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + ], + "range": Array [ + 3, + 21, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 22, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 42, + "column": 24, "line": 1, }, "start": Object { @@ -36061,15 +66683,15 @@ Object { }, "range": Array [ 0, - 42, + 24, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 42, + "column": 24, "line": 1, }, "start": Object { @@ -36079,14 +66701,14 @@ Object { }, "range": Array [ 0, - 42, + 24, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -36096,205 +66718,133 @@ Object { }, "range": Array [ 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, + 1, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, "range": Array [ - 8, - 9, + 2, + 3, ], "type": "Identifier", - "value": "x", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 4, "line": 1, }, "start": Object { - "column": 10, + "column": 3, "line": 1, }, }, "range": Array [ - 10, - 11, + 3, + 4, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Numeric", - "value": "10", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 1, }, "start": Object { - "column": 14, + "column": 4, "line": 1, }, }, "range": Array [ - 14, - 15, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { - "column": 16, + "column": 5, "line": 1, }, }, "range": Array [ - 16, - 17, + 5, + 6, ], "type": "Identifier", - "value": "y", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "y", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 9, "line": 1, }, "start": Object { - "column": 21, + "column": 8, "line": 1, }, }, "range": Array [ - 21, - 22, + 8, + 9, ], "type": "Punctuator", "value": "=", @@ -36302,143 +66852,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 23, + "column": 10, "line": 1, }, }, "range": Array [ - 23, - 25, + 10, + 11, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { - "column": 25, + "column": 11, "line": 1, }, }, "range": Array [ - 25, - 26, + 11, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 16, "line": 1, }, "start": Object { - "column": 28, + "column": 14, "line": 1, }, }, "range": Array [ - 28, - 29, + 14, + 16, ], - "type": "Punctuator", - "value": ":", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 17, "line": 1, }, "start": Object { - "column": 30, + "column": 16, "line": 1, }, }, "range": Array [ - 30, - 31, + 16, + 17, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 18, "line": 1, }, "start": Object { - "column": 32, + "column": 17, "line": 1, }, }, "range": Array [ - 32, - 33, + 17, + 18, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 20, "line": 1, }, "start": Object { - "column": 34, + "column": 19, "line": 1, }, }, "range": Array [ - 34, - 36, + 19, + 20, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 21, "line": 1, }, "start": Object { - "column": 36, + "column": 20, "line": 1, }, }, "range": Array [ - 36, - 37, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -36446,53 +66996,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, + "column": 22, "line": 1, }, "start": Object { - "column": 38, + "column": 21, "line": 1, }, }, "range": Array [ - 38, - 39, + 21, + 22, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 23, "line": 1, }, "start": Object { - "column": 40, + "column": 22, "line": 1, }, }, "range": Array [ - 40, - 41, + 22, + 23, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 24, "line": 1, }, "start": Object { - "column": 41, + "column": 23, "line": 1, }, }, "range": Array [ - 41, - 42, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -36502,124 +67052,99 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-wrapped.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { - "column": 4, + "column": 2, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", + "method": false, + "range": Array [ + 2, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 9, + "column": 31, "line": 1, }, "start": Object { - "column": 5, + "column": 29, "line": 1, }, }, - "method": false, "range": Array [ - 5, - 9, + 29, + 31, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "method": false, - "range": Array [ - 11, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { + }, + "params": Array [ + Object { "left": Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { @@ -36627,16 +67152,74 @@ Object { "line": 1, }, }, - "name": "y", + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 16, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + }, + ], "range": Array [ 14, - 15, + 17, ], - "type": "Identifier", + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 20, + "column": 27, "line": 1, }, "start": Object { @@ -36646,133 +67229,105 @@ Object { }, "range": Array [ 14, - 20, + 27, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 27, "line": 1, }, "start": Object { - "column": 18, + "column": 20, "line": 1, }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 21, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + }, + ], "range": Array [ - 18, 20, + 27, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "ObjectExpression", }, "type": "AssignmentPattern", }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 22, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 27, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + ], + "range": Array [ + 5, + 31, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 32, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 32, + "column": 34, "line": 1, }, "start": Object { @@ -36782,15 +67337,15 @@ Object { }, "range": Array [ 0, - 32, + 34, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 32, + "column": 34, "line": 1, }, "start": Object { @@ -36800,14 +67355,14 @@ Object { }, "range": Array [ 0, - 32, + 34, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -36817,25 +67372,25 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -36843,35 +67398,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { - "column": 5, + "column": 2, "line": 1, }, }, "range": Array [ - 5, - 6, + 2, + 3, ], "type": "Identifier", - "value": "x", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, "range": Array [ - 6, - 7, + 3, + 4, ], "type": "Punctuator", "value": ":", @@ -36879,92 +67434,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 13, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, - 10, + 13, + 14, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "y", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 13, + 14, + 15, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], "type": "Identifier", - "value": "y", + "value": "x", }, Object { "loc": Object { @@ -36982,12 +67519,12 @@ Object { 17, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { @@ -36997,10 +67534,10 @@ Object { }, "range": Array [ 18, - 20, + 19, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { @@ -37018,40 +67555,40 @@ Object { 21, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 22, "line": 1, }, "start": Object { - "column": 22, + "column": 21, "line": 1, }, }, "range": Array [ + 21, 22, - 23, ], "type": "Identifier", - "value": "z", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, "line": 1, }, }, "range": Array [ + 22, 23, - 24, ], "type": "Punctuator", "value": ":", @@ -37063,16 +67600,16 @@ Object { "line": 1, }, "start": Object { - "column": 25, + "column": 24, "line": 1, }, }, "range": Array [ - 25, + 24, 26, ], - "type": "Identifier", - "value": "z", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { @@ -37095,20 +67632,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 1, }, "start": Object { - "column": 28, + "column": 27, "line": 1, }, }, "range": Array [ + 27, 28, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ 29, + 30, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { @@ -37125,8 +67680,8 @@ Object { 30, 31, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -37144,6 +67699,42 @@ Object { 32, ], "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", "value": ";", }, ], @@ -37151,277 +67742,514 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-mixed-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-forOf/loop.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "await": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "EmptyStatement", + }, + "left": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Identifier", + "value": "of", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 1, + "line": 1, }, - "method": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, - "name": "y", + "method": false, "range": Array [ - 8, - 9, + 3, + 4, ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", }, }, - "method": false, - "range": Array [ - 8, - 17, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 12, + "column": 7, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, - "name": "y", + "name": "b", "range": Array [ - 11, - 12, + 6, + 7, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, + "method": false, "range": Array [ - 11, - 17, + 6, + 7, ], - "right": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 15, + "column": 6, "line": 1, }, }, + "name": "b", "range": Array [ - 15, - 17, + 6, + 7, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, + "type": "Identifier", }, - "name": "z", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", }, - "kind": "init", + ], + "range": Array [ + 1, + 9, + ], + "type": "ObjectPattern", + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { - "column": 19, + "column": 14, "line": 1, }, }, - "method": false, + "name": "c", "range": Array [ - 19, - 20, + 14, + 15, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 21, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "type": "Identifier", }, - "start": Object { - "column": 24, - "line": 1, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "range": Array [ + 11, + 15, + ], + "type": "RestElement", }, - "name": "a", - "range": Array [ - 24, - 25, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 0, + 20, + ], + "right": Object { "loc": Object { "end": Object { - "column": 25, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 19, "line": 1, }, }, + "name": "d", "range": Array [ - 4, - 25, + 19, + 20, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 26, + "column": 21, "line": 1, }, "start": Object { @@ -37431,15 +68259,15 @@ Object { }, "range": Array [ 0, - 26, + 21, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 26, + "column": 21, "line": 1, }, "start": Object { @@ -37449,14 +68277,14 @@ Object { }, "range": Array [ 0, - 26, + 21, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -37466,25 +68294,25 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -37492,20 +68320,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 4, "line": 1, }, "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { "column": 5, "line": 1, }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ + 4, 5, - 6, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -37522,8 +68368,8 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -37540,8 +68386,8 @@ Object { 8, 9, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -37559,12 +68405,12 @@ Object { 10, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -37574,33 +68420,33 @@ Object { }, "range": Array [ 11, - 12, + 14, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 15, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { @@ -37610,10 +68456,10 @@ Object { }, "range": Array [ 15, - 17, + 16, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -37631,7 +68477,7 @@ Object { 18, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -37649,7 +68495,7 @@ Object { 20, ], "type": "Identifier", - "value": "z", + "value": "d", }, Object { "loc": Object { @@ -37667,60 +68513,6 @@ Object { 21, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", "value": ";", }, ], @@ -37728,277 +68520,158 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 1, + "line": 1, }, - "method": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, - "name": "x", + "name": "b", "range": Array [ - 5, - 6, + 8, + 9, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { + Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, + "name": "c", "range": Array [ - 9, 11, + 12, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "Identifier", }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "init", + ], "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "method": false, "range": Array [ + 7, 13, - 14, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, + "type": "ArrayPattern", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "method": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 4, - 18, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "range": Array [ + 4, + 13, + ], + "type": "RestElement", }, - "name": "a", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 0, + 18, + ], + "right": Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, + "name": "d", "range": Array [ - 4, - 22, + 17, + 18, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { @@ -38008,16 +68681,16 @@ Object { }, "range": Array [ 0, - 23, + 19, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -38026,14 +68699,14 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -38043,187 +68716,187 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { - "column": 5, + "column": 2, "line": 1, }, }, "range": Array [ - 5, - 6, + 2, + 3, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ + 4, 7, - 8, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 11, + 7, + 8, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 12, + 8, + 9, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 14, + 9, + 10, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 15, + 11, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 13, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, "range": Array [ - 17, - 18, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 16, "line": 1, }, "start": Object { - "column": 19, + "column": 15, "line": 1, }, }, "range": Array [ - 19, - 20, + 15, + 16, ], "type": "Punctuator", "value": "=", @@ -38231,35 +68904,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 22, + 17, + 18, ], "type": "Identifier", - "value": "a", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { - "column": 22, + "column": 18, "line": 1, }, }, "range": Array [ - 22, - 23, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -38269,326 +68942,192 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 12, + "line": 1, }, - "method": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 11, + "column": 24, "line": 1, }, "start": Object { - "column": 9, + "column": 22, "line": 1, }, }, + "name": "ok", "range": Array [ - 9, - 11, + 22, + 24, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "Identifier", }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "init", + ], "loc": Object { "end": Object { "column": 25, "line": 1, }, "start": Object { - "column": 13, + "column": 21, "line": 1, }, }, - "method": false, "range": Array [ - 13, + 21, 25, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 18, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 16, - 25, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + "type": "ArrayPattern", }, - "start": Object { - "column": 29, - "line": 1, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "range": Array [ + 18, + 25, + ], + "type": "RestElement", }, - "name": "a", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { - "column": 30, + "column": 26, "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, - 30, + 11, + 26, ], - "type": "VariableDeclarator", + "type": "ArrayPattern", }, ], - "kind": "var", + "range": Array [ + 0, + 30, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { "column": 31, "line": 1, }, "start": Object { - "column": 0, + "column": 30, "line": 1, }, }, "range": Array [ - 0, + 30, 31, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "comments": Array [], @@ -38611,7 +69150,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -38621,100 +69160,82 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 6, + 9, + 10, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 10, "line": 1, }, }, "range": Array [ - 7, - 8, + 10, + 11, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, 11, + 12, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -38731,26 +69252,26 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -38768,12 +69289,12 @@ Object { 17, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 21, "line": 1, }, "start": Object { @@ -38783,28 +69304,28 @@ Object { }, "range": Array [ 18, - 19, + 21, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 22, "line": 1, }, "start": Object { - "column": 20, + "column": 21, "line": 1, }, }, "range": Array [ - 20, 21, + 22, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { @@ -38821,8 +69342,8 @@ Object { 22, 24, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "ok", }, Object { "loc": Object { @@ -38840,7 +69361,7 @@ Object { 25, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { @@ -38858,25 +69379,43 @@ Object { 26, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 27, "line": 1, }, "start": Object { - "column": 27, + "column": 26, "line": 1, }, }, "range": Array [ + 26, 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ 28, + 29, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { @@ -38893,8 +69432,8 @@ Object { 29, 30, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -38919,278 +69458,236 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, - "method": false, + "name": "c", "range": Array [ + 4, 5, - 11, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ - 5, - 6, + 9, + 10, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, + "method": false, "range": Array [ - 5, - 11, + 9, + 10, ], - "right": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, + "name": "b", "range": Array [ - 9, - 11, + 12, + 13, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "Identifier", }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, - "name": "y", + "method": false, "range": Array [ + 12, 13, - 14, ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 13, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "method": false, - "range": Array [ - 18, - 19, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", + "start": Object { + "column": 12, + "line": 1, }, }, - ], - "range": Array [ - 16, - 21, - ], - "type": "ObjectPattern", + "name": "b", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, }, - }, - ], - "range": Array [ - 4, - 22, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + ], + "range": Array [ + 7, + 15, + ], + "type": "ObjectPattern", }, - "name": "a", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 0, + 20, + ], + "right": Object { "loc": Object { "end": Object { - "column": 26, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 19, "line": 1, }, }, + "name": "d", "range": Array [ - 4, - 26, + 19, + 20, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 27, + "column": 21, "line": 1, }, "start": Object { @@ -39200,16 +69697,16 @@ Object { }, "range": Array [ 0, - 27, + 21, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -39218,14 +69715,14 @@ Object { }, "range": Array [ 0, - 27, + 22, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -39235,10 +69732,28 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 4, + ], + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -39255,8 +69770,8 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { @@ -39273,8 +69788,8 @@ Object { 5, 6, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -39292,12 +69807,12 @@ Object { 8, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { @@ -39307,25 +69822,25 @@ Object { }, "range": Array [ 9, - 11, + 10, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ + 10, 11, - 12, ], "type": "Punctuator", "value": ",", @@ -39333,20 +69848,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 14, ], "type": "Identifier", - "value": "y", + "value": "b", }, Object { "loc": Object { @@ -39364,94 +69879,317 @@ Object { 15, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 16, + "column": 15, "line": 1, }, }, "range": Array [ + 15, 16, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { "column": 19, "line": 1, }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 12, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 4, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, "start": Object { - "column": 18, + "column": 4, "line": 1, }, }, "range": Array [ - 18, - 19, + 4, + 5, ], "type": "Identifier", - "value": "z", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 10, "line": 1, }, "start": Object { - "column": 23, + "column": 9, "line": 1, }, }, "range": Array [ - 23, - 24, + 9, + 10, ], "type": "Punctuator", "value": "=", @@ -39459,35 +70197,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { - "column": 25, + "column": 11, "line": 1, }, }, "range": Array [ - 25, - 26, + 11, + 12, ], "type": "Identifier", - "value": "a", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 13, "line": 1, }, "start": Object { - "column": 26, + "column": 12, "line": 1, }, }, "range": Array [ - 26, - 27, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -39497,407 +70235,140 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/destructured-array-catch.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 42, - ], - "type": "VariableDeclaration", - }, - ], + "expression": Object { + "left": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 2, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 1, + "line": 1, }, }, + "name": "a", "range": Array [ - 24, - 46, + 1, + 2, ], - "type": "BlockStatement", + "type": "Identifier", }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 17, - "line": 5, + "column": 7, + "line": 1, }, }, + "name": "b", "range": Array [ - 64, - 69, + 7, + 8, ], - "type": "BlockStatement", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, - }, - }, - "param": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, + "column": 4, + "line": 1, }, - "range": Array [ - 55, - 62, - ], - "type": "ArrayPattern", }, "range": Array [ - 49, - 69, + 4, + 8, ], - "type": "CatchClause", + "type": "RestElement", }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 20, - 69, - ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 1, }, + "range": Array [ + 0, + 9, + ], + "type": "ArrayPattern", }, - "range": Array [ - 16, - 71, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, - "name": "x", + "operator": "=", "range": Array [ - 9, - 10, + 0, + 13, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "right": Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - }, - ], + "name": "c", "range": Array [ - 11, - 14, + 12, + 13, ], - "type": "ObjectPattern", + "type": "Identifier", }, - ], - "range": Array [ - 0, - 71, - ], - "type": "FunctionDeclaration", - }, - Object { + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 14, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 71, - 72, + 0, + 14, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -39906,14 +70377,14 @@ Object { }, "range": Array [ 0, - 72, + 14, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -39923,64 +70394,118 @@ Object { }, "range": Array [ 0, - 8, + 1, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 8, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ + 10, 11, - 12, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { @@ -39998,7 +70523,7 @@ Object { 13, ], "type": "Identifier", - "value": "a", + "value": "c", }, Object { "loc": Object { @@ -40016,130 +70541,245 @@ Object { 14, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/not-final-array.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 13, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ + 0, 14, - 15, ], - "type": "Punctuator", - "value": ")", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 17, + "column": 1, "line": 1, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 1, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Keyword", - "value": "try", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 24, - 25, + 1, + 4, ], "type": "Punctuator", - "value": "{", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 30, - 33, + 4, + 5, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 34, - 35, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 9, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 35, - 36, + 7, + 8, ], "type": "Identifier", "value": "b", @@ -40147,35 +70787,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 9, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 8, + "line": 1, }, }, "range": Array [ - 36, - 37, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 38, - 39, + 10, + 11, ], "type": "Punctuator", "value": "=", @@ -40183,107 +70823,186 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 40, - 41, + 12, + 13, ], "type": "Identifier", - "value": "a", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 41, - 42, + 13, + 14, ], "type": "Punctuator", "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/single-destructured.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - "start": Object { - "column": 2, - "line": 5, + "operator": "=", + "range": Array [ + 0, + 10, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, + "type": "AssignmentExpression", }, - "range": Array [ - 49, - 54, - ], - "type": "Keyword", - "value": "catch", - }, - Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { - "column": 7, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 54, - 55, + 0, + 11, ], - "type": "Punctuator", - "value": "(", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 1, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 55, - 56, + 0, + 1, ], "type": "Punctuator", "value": "[", @@ -40291,125 +71010,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "value": "stack", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, + "column": 4, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, + "column": 1, + "line": 1, }, }, - "range": Array [ - 61, - 62, + "range": Array [ + 1, + 4, ], "type": "Punctuator", - "value": "]", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 15, - "line": 5, + "column": 4, + "line": 1, }, }, "range": Array [ - 62, - 63, + 4, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 6, + "line": 1, }, "start": Object { - "column": 17, - "line": 5, + "column": 5, + "line": 1, }, }, "range": Array [ - 64, - 65, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 2, - "line": 6, + "column": 7, + "line": 1, }, }, "range": Array [ - 68, - 69, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 10, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 9, + "line": 1, }, }, "range": Array [ - 70, - 71, + 9, + 10, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 11, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 10, + "line": 1, }, }, "range": Array [ - 71, - 72, + 10, + 11, ], "type": "Punctuator", "value": ";", @@ -40419,446 +71120,257 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/destructured-object-catch.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, + "start": Object { + "column": 7, + "line": 1, }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 7, + "line": 1, }, }, + "name": "a", "range": Array [ - 34, - 41, + 7, + 8, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, + "type": "Identifier", }, }, - "range": Array [ - 30, - 42, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 46, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 69, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "param": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 10, + "line": 1, }, }, - "name": "stack", + "name": "b", "range": Array [ - 56, - 61, + 10, + 11, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 10, + "line": 1, }, }, "method": false, "range": Array [ - 56, - 61, + 10, + 11, ], "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 10, + "line": 1, }, }, - "name": "stack", + "name": "b", "range": Array [ - 56, - 61, + 10, + 11, ], "type": "Identifier", }, }, ], "range": Array [ - 55, - 62, + 5, + 13, ], "type": "ObjectPattern", }, - "range": Array [ - 49, - 69, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 69, - ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 71, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "name": "c", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { "loc": Object { "end": Object { - "column": 13, + "column": 19, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, - "name": "a", "range": Array [ - 12, - 13, + 15, + 19, ], - "type": "Identifier", + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, }, - ], + "range": Array [ + 4, + 20, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ - 11, - 14, + 4, + 24, ], - "type": "ObjectPattern", + "type": "VariableDeclarator", }, ], - "range": Array [ - 0, - 71, - ], - "type": "FunctionDeclaration", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 25, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 71, - 72, + 0, + 25, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 25, + "line": 1, }, "start": Object { "column": 0, @@ -40867,14 +71379,14 @@ Object { }, "range": Array [ 0, - 72, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -40884,64 +71396,100 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 10, + 4, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 11, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, "line": 1, }, "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { "column": 11, "line": 1, }, + "start": Object { + "column": 10, + "line": 1, + }, }, "range": Array [ + 10, 11, - 12, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -40958,8 +71506,8 @@ Object { 12, 13, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -40977,184 +71525,356 @@ Object { 14, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 18, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ + 19, 20, - 23, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 24, - 25, + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 30, - 33, + 23, + 24, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 34, - 35, + 24, + 25, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 18, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 23, ], - "type": "Identifier", - "value": "b", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 3, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 4, + "line": 1, }, }, "range": Array [ - 38, - 39, + 4, + 5, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 40, - 41, + 5, + 6, ], "type": "Identifier", "value": "a", @@ -41162,215 +71882,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 6, + "line": 1, }, }, "range": Array [ - 41, - 42, + 6, + 7, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 45, - 46, + 8, + 11, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 49, - 54, - ], - "type": "Keyword", - "value": "catch", + "value": "...", }, Object { "loc": Object { - "end": Object { - "column": 8, - "line": 5, + "end": Object { + "column": 12, + "line": 1, }, "start": Object { - "column": 7, - "line": 5, + "column": 11, + "line": 1, }, }, "range": Array [ - 54, - 55, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 12, + "line": 1, }, }, "range": Array [ - 55, - 56, + 12, + 13, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 5, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 13, + "line": 1, }, }, "range": Array [ - 56, - 61, + 13, + 14, ], - "type": "Identifier", - "value": "stack", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, + "column": 15, + "line": 1, }, }, "range": Array [ - 61, - 62, + 15, + 16, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 62, - 63, + 16, + 17, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 5, + "line": 1, }, "start": Object { "column": 17, - "line": 5, + "line": 1, }, }, "range": Array [ - 64, - 65, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 20, + "line": 1, }, "start": Object { - "column": 2, - "line": 6, + "column": 19, + "line": 1, }, }, "range": Array [ - 68, - 69, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 22, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 21, + "line": 1, }, }, "range": Array [ - 70, - 71, + 21, + 22, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 22, + "line": 1, }, }, "range": Array [ - 71, - 72, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -41380,254 +72082,123 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-multi-destructured.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 3, + "column": 5, "line": 1, }, }, - "name": "Object", + "name": "a", "range": Array [ - 3, - 9, + 5, + 6, ], "type": "Identifier", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 3, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "Object", - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { "column": 11, "line": 1, }, - "start": Object { - "column": 10, - "line": 1, - }, }, + "name": "b", "range": Array [ - 10, 11, + 12, ], - "raw": "0", - "type": "Literal", - "value": 0, + "type": "Identifier", }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 13, + "column": 8, "line": 1, }, }, - "name": "String", "range": Array [ - 13, - 19, + 8, + 12, ], - "type": "Identifier", + "type": "RestElement", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "method": false, - "range": Array [ - 13, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + "range": Array [ + 4, + 13, + ], + "type": "ArrayPattern", }, - "start": Object { - "column": 0, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", }, - }, - "operator": "=", - "range": Array [ - 0, - 29, - ], - "right": Object { "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 27, + "column": 4, "line": 1, }, }, - "properties": Array [], "range": Array [ - 27, - 29, + 4, + 17, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { @@ -41637,16 +72208,16 @@ Object { }, "range": Array [ 0, - 29, + 18, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { "column": 0, @@ -41655,14 +72226,14 @@ Object { }, "range": Array [ 0, - 30, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -41672,64 +72243,64 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 3, + "column": 5, "line": 1, }, }, "range": Array [ - 3, - 9, + 5, + 6, ], "type": "Identifier", - "value": "Object", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 10, + 6, + 7, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { @@ -41738,16 +72309,16 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 11, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -41764,113 +72335,41 @@ Object { 11, 12, ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], "type": "Identifier", - "value": "String", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 13, "line": 1, }, "start": Object { - "column": 23, + "column": 12, "line": 1, }, }, "range": Array [ - 23, - 24, + 12, + 13, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 15, "line": 1, }, "start": Object { - "column": 25, + "column": 14, "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 15, ], "type": "Punctuator", "value": "=", @@ -41878,163 +72377,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 27, + "column": 16, "line": 1, }, }, "range": Array [ - 27, - 28, + 16, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { - "column": 28, + "column": 17, "line": 1, }, }, "range": Array [ - 28, - 29, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/named-param.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, - "name": "responseText", - "range": Array [ - 3, - 15, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 3, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 17, + "column": 5, "line": 1, }, }, - "name": "text", "range": Array [ - 17, - 21, + 5, + 9, ], - "type": "Identifier", + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + "range": Array [ + 4, + 10, + ], + "type": "ArrayPattern", }, - "start": Object { - "column": 1, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", }, - }, - "operator": "=", - "range": Array [ - 1, - 29, - ], - "right": Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 4, "line": 1, }, }, - "name": "res", "range": Array [ - 26, - 29, + 4, + 14, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 1, }, "start": Object { @@ -42044,15 +72523,15 @@ Object { }, "range": Array [ 0, - 31, + 15, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 1, }, "start": Object { @@ -42062,14 +72541,14 @@ Object { }, "range": Array [ 0, - 31, + 15, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -42079,115 +72558,97 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 15, - ], - "type": "Identifier", - "value": "responseText", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, "range": Array [ - 15, - 16, + 5, + 8, ], "type": "Punctuator", - "value": ":", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "range": Array [ - 17, - 21, + 8, + 9, ], "type": "Identifier", - "value": "text", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 10, "line": 1, }, "start": Object { - "column": 22, + "column": 9, "line": 1, }, }, "range": Array [ - 22, - 23, + 9, + 10, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, "range": Array [ - 24, - 25, + 11, + 12, ], "type": "Punctuator", "value": "=", @@ -42195,53 +72656,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 13, "line": 1, }, }, "range": Array [ - 26, - 29, + 13, + 14, ], "type": "Identifier", - "value": "res", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 1, }, "start": Object { - "column": 30, + "column": 14, "line": 1, }, }, "range": Array [ - 30, - 31, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -42251,242 +72694,220 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/nested-array.src 1`] = ` +exports[`javascript fixtures/directives/block.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - null, - Object { - "elements": Array [ - null, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "start": Object { + "column": 2, + "line": 2, }, - "range": Array [ - 10, - 15, - ], - "type": "ArrayPattern", }, - ], + "range": Array [ + 19, + 31, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 4, - 16, + 19, + 32, ], - "type": "ArrayPattern", + "type": "ExpressionStatement", }, - "init": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, + Object { + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "name": "a", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", }, - "range": Array [ - 22, - 23, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "init": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, }, - "range": Array [ - 25, - 26, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, + "start": Object { + "column": 10, + "line": 3, }, - "range": Array [ - 27, - 28, - ], - "raw": "4", - "type": "Literal", - "value": 4, }, - ], + "range": Array [ + 43, + 44, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 24, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 24, - 29, + 39, + 44, ], - "type": "ArrayExpression", + "type": "VariableDeclarator", }, ], + "kind": "var", "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 19, - 30, + 35, + 45, ], - "type": "ArrayExpression", + "type": "VariableDeclaration", }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 48, + 60, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "start": Object { - "column": 4, - "line": 1, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, }, + "range": Array [ + 48, + 61, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 1, }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 15, + 63, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 31, + 63, ], - "type": "VariableDeclaration", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -42495,14 +72916,14 @@ Object { }, "range": Array [ 0, - 31, + 64, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -42512,118 +72933,46 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { "column": 9, "line": 1, }, - "start": Object { - "column": 8, - "line": 1, - }, }, "range": Array [ - 8, 9, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { "column": 12, "line": 1, }, - "start": Object { - "column": 11, - "line": 1, - }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { @@ -42640,26 +72989,8 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { @@ -42677,677 +73008,777 @@ Object { 16, ], "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ 19, - 20, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, + 31, ], - "type": "Numeric", - "value": "1", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 21, - 22, + 31, + 32, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 22, - 23, + 35, + 38, ], - "type": "Numeric", - "value": "2", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 23, - 24, + 39, + 40, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 24, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 24, - 25, + 41, + 42, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 25, - 26, + 43, + 44, ], "type": "Numeric", - "value": "3", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 26, - 27, + 44, + 45, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 27, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 27, - 28, + 48, + 60, ], - "type": "Numeric", - "value": "4", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 28, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 28, - 29, + 60, + 61, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 29, - 30, + 62, + 63, ], "type": "Punctuator", - "value": "]", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/directive-in-class.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 31, + "column": 13, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 13, ], - "type": "Punctuator", - "value": ";", + "type": "ExpressionStatement", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/nested-object.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "constructor", + "range": Array [ + 31, + 42, + ], + "type": "Identifier", + }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { "column": 4, - "line": 1, + "line": 4, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, + "range": Array [ + 31, + 75, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 56, + 68, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "start": Object { - "column": 5, - "line": 1, + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, }, + "range": Array [ + 56, + 69, + ], + "type": "ExpressionStatement", }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", + ], "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 19, + "line": 4, }, }, - "method": false, "range": Array [ - 5, - 9, + 46, + 75, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 4, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", + "params": Array [], + "range": Array [ + 43, + 75, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 8, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 8, }, - "method": false, - "range": Array [ - 11, - 22, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + }, + "name": "foo", + "range": Array [ + 85, + 88, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 81, + 121, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 9, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 9, }, }, - "method": false, "range": Array [ - 16, - 20, + 102, + 114, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 9, }, }, - ], - "range": Array [ - 14, - 22, - ], - "type": "ObjectPattern", + "range": Array [ + 102, + 115, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 8, + }, }, + "range": Array [ + 92, + 121, + ], + "type": "BlockStatement", }, - ], - "range": Array [ - 4, - 24, - ], - "type": "ObjectPattern", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 8, + }, + }, + "params": Array [], + "range": Array [ + 89, + 121, + ], + "type": "FunctionExpression", + }, }, - "init": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 12, + }, + "start": Object { + "column": 8, + "line": 12, + }, + }, + "name": "foo", + "range": Array [ + 131, + 134, + ], + "type": "Identifier", + }, + "kind": "set", "loc": Object { "end": Object { - "column": 52, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 27, - "line": 1, + "column": 4, + "line": 12, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + "range": Array [ + 127, + 172, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "range": Array [ + 153, + 165, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "start": Object { - "column": 29, - "line": 1, + "loc": Object { + "end": Object { + "column": 21, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, }, + "range": Array [ + 153, + 166, + ], + "type": "ExpressionStatement", }, - "name": "x", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - }, - "kind": "init", + ], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 29, - "line": 1, + "column": 20, + "line": 12, }, }, - "method": false, "range": Array [ - 29, - 35, + 143, + 172, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 35, - ], - "raw": "\\"3\\"", - "type": "Literal", - "value": "3", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 14, + }, + "start": Object { + "column": 12, + "line": 12, }, }, - Object { - "computed": false, - "key": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 18, + "line": 12, }, "start": Object { - "column": 37, - "line": 1, + "column": 13, + "line": 12, }, }, - "name": "z", + "name": "value", "range": Array [ - 37, - 38, + 136, + 141, ], "type": "Identifier", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, + ], + "range": Array [ + 135, + 172, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 16, }, - "method": false, - "range": Array [ - 37, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - }, - "kind": "init", + "start": Object { + "column": 4, + "line": 16, + }, + }, + "name": "method", + "range": Array [ + 178, + 184, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 16, + }, + }, + "range": Array [ + 178, + 217, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 20, + "line": 17, }, "start": Object { - "column": 42, - "line": 1, + "column": 8, + "line": 17, }, }, - "method": false, "range": Array [ - 42, - 48, + 198, + 210, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"b\\"", - "type": "Literal", - "value": "b", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 17, + }, + "start": Object { + "column": 8, + "line": 17, }, }, - ], - "range": Array [ - 40, - 50, - ], - "type": "ObjectExpression", + "range": Array [ + 198, + 211, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 18, + }, + "start": Object { + "column": 14, + "line": 16, + }, }, + "range": Array [ + 188, + 217, + ], + "type": "BlockStatement", }, - ], - "range": Array [ - 27, - 52, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 18, + }, + "start": Object { + "column": 11, + "line": 16, + }, + }, + "params": Array [], + "range": Array [ + 185, + 217, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 52, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 19, + }, + "start": Object { + "column": 10, + "line": 3, + }, }, - ], - "kind": "var", + "range": Array [ + 25, + 219, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 53, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 53, + 15, + 219, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 53, - "line": 1, + "column": 0, + "line": 20, }, "start": Object { "column": 0, @@ -43356,14 +73787,14 @@ Object { }, "range": Array [ 0, - 53, + 220, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { @@ -43373,151 +73804,295 @@ Object { }, "range": Array [ 0, - 3, + 12, ], - "type": "Keyword", - "value": "var", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 5, + 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { "column": 6, - "line": 1, + "line": 3, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 5, - 6, + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 31, + 42, ], "type": "Identifier", - "value": "x", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 6, - 7, + 43, + 44, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 5, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "range": Array [ - 8, - 9, + 56, + 68, ], - "type": "Identifier", - "value": "y", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 21, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 20, + "line": 5, }, }, "range": Array [ - 9, - 10, + 68, + 69, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, }, "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 81, + 84, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { "column": 11, - "line": 1, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, }, }, "range": Array [ - 11, - 12, + 85, + 88, ], "type": "Identifier", - "value": "z", + "value": "foo", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 1, + "line": 8, }, "start": Object { "column": 12, - "line": 1, + "line": 8, }, }, "range": Array [ - 12, - 13, + 89, + 90, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 13, + "line": 8, }, }, "range": Array [ - 14, - 15, + 90, + 91, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 92, + 93, ], "type": "Punctuator", "value": "{", @@ -43525,89 +74100,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 20, + "line": 9, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 9, }, }, "range": Array [ - 16, - 17, + 102, + 114, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 9, + }, + "start": Object { + "column": 20, + "line": 9, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 10, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "range": Array [ + 127, + 130, ], "type": "Identifier", - "value": "a", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 11, + "line": 12, }, "start": Object { - "column": 17, - "line": 1, + "column": 8, + "line": 12, }, }, "range": Array [ - 17, - 18, + 131, + 134, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 12, + }, + "start": Object { + "column": 12, + "line": 12, + }, + }, + "range": Array [ + 135, + 136, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 18, + "line": 12, }, "start": Object { - "column": 19, - "line": 1, + "column": 13, + "line": 12, }, }, "range": Array [ - 19, - 20, + 136, + 141, ], "type": "Identifier", - "value": "b", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 19, + "line": 12, + }, + "start": Object { + "column": 18, + "line": 12, + }, + }, + "range": Array [ + 141, + 142, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 12, + }, + "start": Object { + "column": 20, + "line": 12, + }, + }, + "range": Array [ + 143, + 144, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 13, }, "start": Object { + "column": 8, + "line": 13, + }, + }, + "range": Array [ + 153, + 165, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { "column": 21, - "line": 1, + "line": 13, + }, + "start": Object { + "column": 20, + "line": 13, }, }, "range": Array [ - 21, - 22, + 165, + 166, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 14, }, }, "range": Array [ - 23, - 24, + 171, + 172, ], "type": "Punctuator", "value": "}", @@ -43615,418 +74316,519 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 10, + "line": 16, }, "start": Object { - "column": 25, - "line": 1, + "column": 4, + "line": 16, }, }, "range": Array [ - 25, - 26, + 178, + 184, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 12, + "line": 16, }, "start": Object { - "column": 27, - "line": 1, + "column": 11, + "line": 16, }, }, "range": Array [ - 27, - 28, + 185, + 186, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 13, + "line": 16, }, "start": Object { - "column": 29, - "line": 1, + "column": 12, + "line": 16, }, }, "range": Array [ - 29, - 30, + 186, + 187, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 15, + "line": 16, }, "start": Object { - "column": 30, - "line": 1, + "column": 14, + "line": 16, }, }, "range": Array [ - 30, - 31, + 188, + 189, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 20, + "line": 17, }, "start": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 17, }, }, "range": Array [ - 32, - 35, + 198, + 210, ], "type": "String", - "value": "\\"3\\"", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 21, + "line": 17, }, "start": Object { - "column": 35, - "line": 1, + "column": 20, + "line": 17, }, }, "range": Array [ - 35, - 36, + 210, + 211, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 5, + "line": 18, }, "start": Object { - "column": 37, - "line": 1, + "column": 4, + "line": 18, }, }, "range": Array [ - 37, - 38, + 216, + 217, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { - "column": 38, - "line": 1, + "column": 0, + "line": 19, }, }, "range": Array [ - 38, - 39, + 218, + 219, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/first-expression.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 121, + 122, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 40, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 40, - 41, + 121, + 123, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, Object { + "directive": "abc", + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 124, + 129, + ], + "raw": "\\"abc\\"", + "type": "Literal", + "value": "abc", + }, "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 42, - 43, + 124, + 129, ], - "type": "Identifier", - "value": "a", + "type": "ExpressionStatement", }, + ], + "comments": Array [ Object { "loc": Object { "end": Object { - "column": 44, + "column": 50, "line": 1, }, "start": Object { - "column": 43, + "column": 0, "line": 1, }, }, "range": Array [ - 43, - 44, + 0, + 50, ], - "type": "Punctuator", - "value": ":", + "type": "Line", + "value": " Prevent strings from being parsed as directives", }, Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 69, + "line": 2, }, "start": Object { - "column": 45, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 45, - 48, + 51, + 120, ], - "type": "String", - "value": "\\"b\\"", + "type": "Line", + "value": " See https://github.com/prettier/prettier/pull/1560#issue-227225960", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 3, }, + }, + "range": Array [ + 121, + 130, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 50, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 49, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 49, - 50, + 121, + 122, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 52, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 51, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ - 51, - 52, + 122, + 123, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 53, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 52, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 52, - 53, + 124, + 129, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"abc\\"", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/object-var-named.src 1`] = ` +exports[`javascript fixtures/directives/function-non-strict.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use smth", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 30, + ], + "raw": "\\"use smth\\"", + "type": "Literal", + "value": "use smth", + }, "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 2, + "line": 2, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", + "range": Array [ + 20, + 30, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 2, + "line": 3, }, }, - "method": false, "range": Array [ - 5, - 8, + 33, + 34, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "operator": "+", + "range": Array [ + 33, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, }, - "name": "b", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", }, + "range": Array [ + 35, + 36, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, - ], - "range": Array [ - 4, - 9, - ], - "type": "ObjectPattern", - }, - "init": Object { + "type": "BinaryExpression", + }, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 3, }, }, - "properties": Array [], "range": Array [ - 12, - 14, + 33, + 37, ], - "type": "ObjectExpression", + "type": "ExpressionStatement", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 16, + 39, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 15, + 39, ], - "type": "VariableDeclaration", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -44035,82 +74837,10 @@ Object { }, "range": Array [ 0, - 15, + 40, ], "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, + "tokens": Array [ Object { "loc": Object { "end": Object { @@ -44118,553 +74848,600 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 0, "line": 1, }, }, "range": Array [ - 7, + 0, 8, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 10, + "column": 13, "line": 1, }, }, "range": Array [ - 10, - 11, + 13, + 14, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 13, + 14, + 15, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 14, - 15, + 20, + 30, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"use smth\\"", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/object-var-undefined.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 10, - 12, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 0, - 13, + 33, + 34, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "1", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 3, + "line": 3, }, }, "range": Array [ - 0, - 3, + 34, + 35, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "+", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "range": Array [ - 4, - 5, + 35, + 36, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { "column": 6, - "line": 1, + "line": 3, }, "start": Object { "column": 5, - "line": 1, + "line": 3, }, }, "range": Array [ - 5, - 6, + 36, + 37, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 6, - 7, + 38, + 39, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/non-directive-string.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 28, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 28, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "range": Array [ + 10, + 30, + ], + "type": "BlockStatement", }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, "range": Array [ - 10, - 11, + 0, + 30, ], - "type": "Punctuator", - "value": "{", + "test": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 8, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "IfStatement", }, Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, + "cases": Array [ + Object { + "consequent": Array [ + Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 74, + 86, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 74, + 86, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 64, + 92, + ], + "type": "BlockStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 52, + 92, + ], + "test": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 57, + 62, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "SwitchCase", + }, + Object { + "consequent": Array [ + Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 10, + }, + "start": Object { + "column": 8, + "line": 10, + }, + }, + "range": Array [ + 116, + 128, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 10, + }, + "start": Object { + "column": 8, + "line": 10, + }, + }, + "range": Array [ + 116, + 128, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 13, + "line": 9, + }, + }, + "range": Array [ + 106, + 134, + ], + "type": "BlockStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "range": Array [ + 97, + 134, + ], + "test": null, + "type": "SwitchCase", }, - "start": Object { - "column": 11, - "line": 1, + ], + "discriminant": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, }, + "range": Array [ + 40, + 44, + ], + "raw": "true", + "type": "Literal", + "value": true, }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 12, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 12, - 13, + 32, + 136, ], - "type": "Punctuator", - "value": ";", + "type": "SwitchStatement", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/param-defaults-array.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 15, + }, + "start": Object { + "column": 4, + "line": 15, + }, + }, + "range": Array [ + 157, + 169, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 15, + }, + "start": Object { + "column": 4, + "line": 15, + }, + }, + "range": Array [ + 157, + 169, + ], + "type": "ExpressionStatement", }, - }, - "range": Array [ - 21, - 23, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 16, }, "start": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 14, }, }, - "name": "a", "range": Array [ - 9, - 10, + 151, + 171, ], - "type": "Identifier", + "type": "BlockStatement", }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 16, }, "start": Object { "column": 0, - "line": 1, + "line": 14, }, }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "ArrayPattern", - }, - ], "range": Array [ - 0, - 23, + 138, + 171, ], - "type": "FunctionDeclaration", + "test": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 14, + }, + "start": Object { + "column": 7, + "line": 14, + }, + }, + "range": Array [ + 145, + 149, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "WhileStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 17, }, "start": Object { "column": 0, @@ -44673,14 +75450,14 @@ Object { }, "range": Array [ 0, - 23, + 172, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 2, "line": 1, }, "start": Object { @@ -44690,43 +75467,25 @@ Object { }, "range": Array [ 0, - 8, + 2, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", + "value": "if", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 4, "line": 1, }, "start": Object { - "column": 10, + "column": 3, "line": 1, }, }, "range": Array [ - 10, - 11, + 3, + 4, ], "type": "Punctuator", "value": "(", @@ -44734,411 +75493,251 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 12, + 4, + 8, ], - "type": "Punctuator", - "value": "[", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { - "column": 12, + "column": 8, "line": 1, }, }, "range": Array [ - 12, - 13, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 15, + 10, + 11, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ 16, - 18, + 28, ], - "type": "Numeric", - "value": "10", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 29, + 30, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 6, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 19, - 20, + 32, + 38, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "switch", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 5, }, }, "range": Array [ - 21, - 22, + 39, + 40, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 12, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 22, - 23, + 40, + 44, ], - "type": "Punctuator", - "value": "}", + "type": "Boolean", + "value": "true", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/param-defaults-object.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 11, - 19, - ], - "type": "ObjectPattern", + "column": 12, + "line": 5, }, - ], + }, "range": Array [ - 0, - 23, + 44, + 45, ], - "type": "FunctionDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, + "type": "Punctuator", + "value": ")", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 8, - "line": 1, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 0, - 8, + 52, + 56, ], "type": "Keyword", - "value": "function", + "value": "case", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 14, + "line": 6, }, "start": Object { "column": 9, - "line": 1, + "line": 6, }, }, "range": Array [ - 9, - 10, + 57, + 62, ], - "type": "Identifier", - "value": "a", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 14, + "line": 6, }, }, "range": Array [ - 10, - 11, + 62, + 63, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 6, }, }, "range": Array [ - 11, - 12, + 64, + 65, ], "type": "Punctuator", "value": "{", @@ -45146,497 +75745,305 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 20, + "line": 7, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 12, - 13, + 74, + 86, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 14, - 15, + 91, + 92, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 11, + "line": 9, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 9, }, }, "range": Array [ - 16, - 18, + 97, + 104, ], - "type": "Numeric", - "value": "10", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 9, }, "start": Object { - "column": 18, - "line": 1, + "column": 11, + "line": 9, }, }, "range": Array [ - 18, - 19, + 104, + 105, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 9, }, "start": Object { - "column": 19, - "line": 1, + "column": 13, + "line": 9, }, }, "range": Array [ - 19, - 20, + 106, + 107, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 20, + "line": 10, }, "start": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 10, }, }, "range": Array [ - 21, - 22, + 116, + 128, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 11, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 11, }, }, "range": Array [ - 22, - 23, + 133, + 134, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/param-defaults-object-nested.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 12, }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "start": Object { + "column": 0, + "line": 12, }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", }, + "range": Array [ + 135, + 136, + ], + "type": "Punctuator", + "value": "}", + }, + Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { "column": 0, - "line": 1, + "line": 14, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 20, - 33, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 25, - 31, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 23, - 33, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 11, - 34, - ], - "type": "ObjectPattern", + "range": Array [ + 138, + 143, + ], + "type": "Keyword", + "value": "while", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 14, + }, + "start": Object { + "column": 6, + "line": 14, }, + }, + "range": Array [ + 144, + 145, ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 14, + }, + "start": Object { + "column": 7, + "line": 14, + }, + }, "range": Array [ - 0, - 38, + 145, + 149, ], - "type": "FunctionDeclaration", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 12, + "line": 14, }, "start": Object { - "column": 38, - "line": 1, + "column": 11, + "line": 14, }, }, "range": Array [ - 38, - 39, + 149, + 150, ], - "type": "EmptyStatement", + "type": "Punctuator", + "value": ")", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 14, + }, + "start": Object { + "column": 13, + "line": 14, + }, + }, + "range": Array [ + 151, + 152, + ], + "type": "Punctuator", + "value": "{", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 15, + }, + "start": Object { + "column": 4, + "line": 15, + }, + }, + "range": Array [ + 157, + 169, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 16, + }, + "start": Object { + "column": 0, + "line": 16, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 39, ], - "sourceType": "module", - "tokens": Array [ + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/non-unique-directive.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 1, }, "start": Object { @@ -45646,47 +76053,101 @@ Object { }, "range": Array [ 0, - 8, + 13, ], - "type": "Keyword", - "value": "function", + "type": "ExpressionStatement", }, Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 14, + 26, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 9, - 10, + 14, + 27, ], - "type": "Identifier", - "value": "a", + "type": "ExpressionStatement", }, Object { + "directive": "test", + "expression": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 28, + 34, + ], + "raw": "\\"test\\"", + "type": "Literal", + "value": "test", + }, "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 10, - 11, + 28, + 35, ], - "type": "Punctuator", - "value": "(", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { @@ -45694,16 +76155,16 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, + 0, 12, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { @@ -45720,275 +76181,412 @@ Object { 12, 13, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ 14, - 15, + 26, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 16, - 18, + 28, + 34, ], - "type": "Numeric", - "value": "10", + "type": "String", + "value": "\\"test\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 18, - 19, + 34, + 35, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/program.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 13, ], - "type": "Identifier", - "value": "y", + "type": "ExpressionStatement", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 23, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 21, - 22, + 14, + 24, ], - "type": "Punctuator", - "value": ":", + "type": "VariableDeclaration", }, Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 37, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 23, - 24, + 25, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 12, ], - "type": "Identifier", - "value": "z", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 3, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 29, - 31, + 14, + 17, ], - "type": "Numeric", - "value": "10", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 32, - 33, + 18, + 19, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 33, - 34, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { - "end": Object { - "column": 35, - "line": 1, + "end": Object { + "column": 9, + "line": 2, }, "start": Object { - "column": 34, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 34, - 35, + 22, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 36, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 36, - 37, + 23, + 24, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 37, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ + 25, 37, - 38, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 38, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ + 37, 38, - 39, ], "type": "Punctuator", "value": ";", @@ -45998,145 +76596,145 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/params-array.src 1`] = ` +exports[`javascript fixtures/directives/program-order.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 22, + 0, + 12, ], - "type": "BlockStatement", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "expression": false, - "generator": false, - "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + Object { + "directive": "use loose", + "expression": Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, - "name": "x", "range": Array [ - 9, - 10, + 14, + 25, ], - "type": "Identifier", + "raw": "\\"use loose\\"", + "type": "Literal", + "value": "use loose", }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, - "params": Array [ + "range": Array [ + 14, + 26, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 3, }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", }, - ], + "name": "a", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "init": null, "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 11, - 19, + 31, + 32, ], - "type": "ArrayPattern", + "type": "VariableDeclarator", }, ], - "range": Array [ - 0, - 22, - ], - "type": "FunctionDeclaration", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 22, - 23, + 27, + 33, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -46145,14 +76743,14 @@ Object { }, "range": Array [ 0, - 23, + 34, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -46162,205 +76760,214 @@ Object { }, "range": Array [ 0, - 8, + 12, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, "range": Array [ - 9, - 10, + 12, + 13, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 10, - 11, + 14, + 25, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use loose\\"", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 1, + "line": 2, }, "start": Object { "column": 11, - "line": 1, + "line": 2, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 14, - 15, + 27, + 30, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 16, - 17, + 31, + 32, ], "type": "Identifier", - "value": "b", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 18, - 19, + 32, + 33, ], "type": "Punctuator", - "value": "]", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/raw.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, + "directive": "use\\\\x20strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 15, + ], + "raw": "\\"use\\\\x20strict\\"", + "type": "Literal", + "value": "use strict", }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 16, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 15, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use\\\\x20strict\\"", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 16, "line": 1, }, "start": Object { - "column": 22, + "column": 15, "line": 1, }, }, "range": Array [ - 22, - 23, + 15, + 16, ], "type": "Punctuator", "value": ";", @@ -46370,145 +76977,72 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/params-array-wrapped.src 1`] = ` +exports[`javascript fixtures/experimentalAsyncIteration/async-generators.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, + "async": true, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 1, + "column": 22, "line": 1, }, }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "ArrayPattern", - }, + "range": Array [ + 22, + 26, ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "foo", "range": Array [ - 1, - 23, + 16, + 19, ], - "type": "FunctionExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 25, + 26, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -46517,14 +77051,14 @@ Object { }, "range": Array [ 0, - 25, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -46534,83 +77068,29 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 9, + 6, + 14, ], "type": "Keyword", "value": "function", }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "[", - }, Object { "loc": Object { "end": Object { @@ -46626,44 +77106,26 @@ Object { 14, 15, ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], "type": "Punctuator", - "value": ",", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ - 17, - 18, + 16, + 19, ], "type": "Identifier", - "value": "b", + "value": "foo", }, Object { "loc": Object { @@ -46681,7 +77143,7 @@ Object { 20, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { @@ -46701,24 +77163,6 @@ Object { "type": "Punctuator", "value": ")", }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, Object { "loc": Object { "end": Object { @@ -46735,69 +77179,162 @@ Object { 23, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 24, 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/params-multi-object.src 1`] = ` +exports[`javascript fixtures/experimentalAsyncIteration/async-iterator.src 1`] = ` Object { "body": Array [ Object { - "async": false, + "async": true, "body": Object { - "body": Array [], + "body": Array [ + Object { + "await": true, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 59, + 67, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "item", + "range": Array [ + 44, + 48, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 38, + 48, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 27, + 67, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "name": "items", + "range": Array [ + 52, + 57, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 20, + "column": 21, "line": 1, }, }, "range": Array [ - 20, - 22, + 21, + 69, ], "type": "BlockStatement", }, @@ -46806,24 +77343,60 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ - 9, - 10, + 15, + 18, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 0, + 69, + ], + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 70, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, "line": 1, }, "start": Object { @@ -46831,301 +77404,243 @@ Object { "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", + "range": Array [ + 0, + 5, + ], + "type": "Identifier", + "value": "async", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 14, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, }, + }, + "range": Array [ + 15, + 18, ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, "range": Array [ - 0, - 22, + 18, + 19, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 8, + 21, + 22, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 10, + 27, + 30, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 10, - 11, + 31, + 36, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 11, - 12, + 37, + 38, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 12, - 13, + 38, + 43, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 14, - 15, + 44, + 48, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "item", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 16, - 17, + 49, + 51, ], "type": "Identifier", - "value": "b", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 18, - 19, + 52, + 57, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "items", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 19, - 20, + 57, + 58, ], "type": "Punctuator", "value": ")", @@ -47133,17 +77648,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 36, + "line": 2, }, }, "range": Array [ - 20, - 21, + 59, + 60, ], "type": "Punctuator", "value": "{", @@ -47151,17 +77666,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 21, - 22, + 66, + 67, ], "type": "Punctuator", "value": "}", @@ -47169,186 +77684,180 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 22, - 23, + 68, + 69, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/params-nested-array.src 1`] = ` +exports[`javascript fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "main", + "range": Array [ + 19, + 23, + ], + "type": "Identifier", }, - }, - "name": "a", - "range": Array [ - 9, - 10, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, }, - null, - Object { - "elements": Array [ - null, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "object": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", }, - ], + "range": Array [ + 7, + 12, + ], + "raw": "'foo'", + "type": "Literal", + "value": "foo", + }, + ], + "callee": Object { "loc": Object { "end": Object { - "column": 22, + "column": 6, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 22, + 0, + 6, ], - "type": "ArrayPattern", + "type": "Import", }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - "start": Object { - "column": 11, - "line": 1, + "range": Array [ + 0, + 13, + ], + "type": "CallExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "name": "then", + "range": Array [ + 14, + 18, + ], + "type": "Identifier", }, "range": Array [ - 11, - 23, + 0, + 18, ], - "type": "ArrayPattern", + "type": "MemberExpression", }, - ], - "range": Array [ - 0, - 27, - ], - "type": "FunctionDeclaration", - }, - Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 28, + "column": 25, "line": 1, }, "start": Object { - "column": 27, + "column": 0, "line": 1, }, }, "range": Array [ - 27, - 28, + 0, + 25, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -47357,207 +77866,135 @@ Object { }, "range": Array [ 0, - 28, + 26, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, + "column": 6, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 6, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 7, "line": 1, }, "start": Object { - "column": 13, + "column": 6, "line": 1, }, }, "range": Array [ - 13, - 14, + 6, + 7, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, "range": Array [ - 15, - 16, + 7, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "String", + "value": "'foo'", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 13, "line": 1, }, "start": Object { - "column": 17, + "column": 12, "line": 1, }, }, "range": Array [ - 17, - 18, + 12, + 13, ], "type": "Punctuator", - "value": "[", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 14, "line": 1, }, "start": Object { - "column": 18, + "column": 13, "line": 1, }, }, "range": Array [ - 18, - 19, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 14, "line": 1, }, }, "range": Array [ - 20, - 21, + 14, + 18, ], "type": "Identifier", - "value": "z", + "value": "then", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { @@ -47566,16 +78003,16 @@ Object { "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, + 19, 23, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "main", }, Object { "loc": Object { @@ -47598,53 +78035,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { "column": 25, "line": 1, }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, "start": Object { - "column": 27, + "column": 24, "line": 1, }, }, "range": Array [ - 27, - 28, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -47654,7 +78055,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring/params-nested-object.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` Object { "body": Array [ Object { @@ -47663,17 +78064,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 35, + "column": 24, "line": 1, }, "start": Object { - "column": 33, + "column": 22, "line": 1, }, }, "range": Array [ - 33, - 35, + 22, + 24, ], "type": "BlockStatement", }, @@ -47690,7 +78091,7 @@ Object { "line": 1, }, }, - "name": "a", + "name": "c", "range": Array [ 9, 10, @@ -47699,7 +78100,7 @@ Object { }, "loc": Object { "end": Object { - "column": 35, + "column": 24, "line": 1, }, "start": Object { @@ -47711,7 +78112,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 20, "line": 1, }, "start": Object { @@ -47733,7 +78134,7 @@ Object { "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ 12, 13, @@ -47743,7 +78144,7 @@ Object { "kind": "init", "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { @@ -47754,32 +78155,31 @@ Object { "method": false, "range": Array [ 12, - 16, + 13, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, - "name": "y", + "name": "a", "range": Array [ - 15, - 16, + 12, + 13, ], "type": "Identifier", }, }, Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { "column": 19, @@ -47790,145 +78190,49 @@ Object { "line": 1, }, }, - "name": "z", + "name": "b", "range": Array [ 18, 19, ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, - "method": false, "range": Array [ - 18, - 29, + 15, + 19, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 23, - 27, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 21, - 29, - ], - "type": "ObjectPattern", - }, + "type": "RestElement", }, ], "range": Array [ 11, - 31, + 20, ], "type": "ObjectPattern", }, ], "range": Array [ 0, - 35, + 24, ], "type": "FunctionDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "EmptyStatement", - }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -47937,7 +78241,7 @@ Object { }, "range": Array [ 0, - 36, + 25, ], "sourceType": "module", "tokens": Array [ @@ -47975,7 +78279,7 @@ Object { 10, ], "type": "Identifier", - "value": "a", + "value": "c", }, Object { "loc": Object { @@ -48029,7 +78333,7 @@ Object { 13, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { @@ -48047,12 +78351,12 @@ Object { 14, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { @@ -48062,28 +78366,10 @@ Object { }, "range": Array [ 15, - 16, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { @@ -48101,7 +78387,7 @@ Object { 19, ], "type": "Identifier", - "value": "z", + "value": "b", }, Object { "loc": Object { @@ -48119,130 +78405,22 @@ Object { 20, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "a", - }, - 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": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", "value": "}", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 21, "line": 1, }, "start": Object { - "column": 31, + "column": 20, "line": 1, }, }, "range": Array [ - 31, - 32, + 20, + 21, ], "type": "Punctuator", "value": ")", @@ -48250,17 +78428,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 23, "line": 1, }, "start": Object { - "column": 33, + "column": 22, "line": 1, }, }, "range": Array [ - 33, - 34, + 22, + 23, ], "type": "Punctuator", "value": "{", @@ -48268,106 +78446,39 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, + "column": 24, "line": 1, }, "start": Object { - "column": 34, + "column": 23, "line": 1, }, }, "range": Array [ - 34, - 35, + 23, + 24, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/params-object.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 19, + "column": 10, "line": 1, }, "start": Object { - "column": 11, + "column": 1, "line": 1, }, }, @@ -48377,152 +78488,250 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 13, + "column": 2, "line": 1, }, }, "name": "a", "range": Array [ - 13, - 14, + 2, + 3, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 13, + "column": 2, "line": 1, }, }, "method": false, "range": Array [ - 13, - 14, + 2, + 3, ], "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 13, + "column": 2, "line": 1, }, }, "name": "a", "range": Array [ - 13, - 14, + 2, + 3, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 8, + 9, ], "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 9, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 1, + 10, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 22, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, }, + }, + "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, - "name": "b", + "name": "a", "range": Array [ - 16, - 17, + 14, + 15, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "method": false, "range": Array [ - 16, - 17, + 14, + 15, ], "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, "line": 1, }, }, "name": "b", "range": Array [ - 16, - 17, + 20, + 21, ], "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "SpreadElement", }, ], "range": Array [ - 11, - 19, + 13, + 22, ], - "type": "ObjectPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 22, - ], - "type": "FunctionDeclaration", - }, - Object { + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 23, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, + 0, 23, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -48531,14 +78740,14 @@ Object { }, "range": Array [ 0, - 23, + 24, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -48548,586 +78757,490 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 2, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, "range": Array [ - 9, - 10, + 1, + 2, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 3, "line": 1, }, "start": Object { - "column": 10, + "column": 2, "line": 1, }, }, "range": Array [ - 10, - 11, + 2, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 4, "line": 1, }, "start": Object { - "column": 11, + "column": 3, "line": 1, }, }, "range": Array [ - 11, - 12, + 3, + 4, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 5, "line": 1, }, }, "range": Array [ - 13, - 14, + 5, + 8, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { - "column": 14, + "column": 8, "line": 1, }, }, "range": Array [ - 14, - 15, + 8, + 9, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { - "column": 16, + "column": 9, "line": 1, }, }, "range": Array [ - 16, - 17, + 9, + 10, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 19, + "column": 13, "line": 1, }, }, "range": Array [ - 19, - 20, + 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 15, "line": 1, }, "start": Object { - "column": 20, + "column": 14, "line": 1, }, }, "range": Array [ - 20, - 21, + 14, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 16, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 17, "line": 1, }, }, "range": Array [ - 22, - 23, + 17, + 20, ], "type": "Punctuator", - "value": ";", + "value": "...", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring/params-object-wrapped.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 17, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 1, - 23, - ], - "type": "FunctionExpression", - }, "loc": Object { "end": Object { - "column": 25, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, - 25, + 20, + 21, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "b", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 1, + 21, + 22, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 23, "line": 1, }, "start": Object { - "column": 1, + "column": 22, "line": 1, }, }, "range": Array [ - 1, - 9, + 22, + 23, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ")", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 11, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "properties": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 13, + 21, + ], + "type": "ObjectPattern", + }, + ], "range": Array [ - 10, - 11, + 0, + 26, ], - "type": "Identifier", - "value": "x", + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 12, + 0, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 12, - 13, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 16, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 17, - 18, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -49136,16 +79249,16 @@ Object { "line": 1, }, "start": Object { - "column": 19, + "column": 17, "line": 1, }, }, "range": Array [ - 19, + 17, 20, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { @@ -49163,7 +79276,7 @@ Object { 21, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { @@ -49181,25 +79294,7 @@ Object { 22, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { @@ -49217,130 +79312,246 @@ Object { 24, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 26, "line": 1, }, "start": Object { - "column": 24, + "column": 25, "line": 1, }, }, "range": Array [ - 24, 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring/sparse-array.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; + +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "start": Object { - "column": 1, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - }, - null, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, }, - "name": "b", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 16, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 4, + 19, + ], + "type": "ObjectPattern", }, - "start": Object { - "column": 0, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { "loc": Object { "end": Object { - "column": 14, + "column": 25, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "name": "array", "range": Array [ - 9, - 14, + 4, + 25, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { @@ -49350,16 +79561,16 @@ Object { }, "range": Array [ 0, - 15, + 26, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -49368,14 +79579,14 @@ Object { }, "range": Array [ 0, - 15, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -49385,43 +79596,61 @@ Object { }, "range": Array [ 0, - 1, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 2, + 6, + 7, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { - "column": 2, + "column": 7, "line": 1, }, }, "range": Array [ - 2, - 3, + 7, + 8, ], "type": "Punctuator", "value": ",", @@ -49429,17 +79658,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 4, + "column": 10, "line": 1, }, "start": Object { - "column": 3, + "column": 9, "line": 1, }, }, "range": Array [ - 3, - 4, + 9, + 10, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, ], "type": "Punctuator", "value": ",", @@ -49447,53 +79694,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 15, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 5, + 12, + 15, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Identifier", - "value": "b", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 17, "line": 1, }, "start": Object { - "column": 5, + "column": 16, "line": 1, }, }, "range": Array [ - 5, - 6, + 16, + 17, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 19, "line": 1, }, "start": Object { - "column": 7, + "column": 18, "line": 1, }, }, "range": Array [ - 7, - 8, + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Punctuator", "value": "=", @@ -49501,35 +79784,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 25, "line": 1, }, "start": Object { - "column": 9, + "column": 22, "line": 1, }, }, "range": Array [ - 9, - 14, + 22, + 25, ], "type": "Identifier", - "value": "array", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { - "column": 14, + "column": 25, "line": 1, }, }, "range": Array [ - 14, - 15, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -49539,91 +79822,452 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 16, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 4, + 18, + ], + "type": "ObjectPattern", }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ + "init": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 23, + 27, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 29, + 33, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + }, Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 3, + "column": 39, "line": 1, }, "start": Object { - "column": 2, + "column": 35, "line": 1, }, }, - "name": "y", + "method": false, "range": Array [ - 2, - 3, + 35, + 39, ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, }, - "start": Object { - "column": 1, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 41, + 45, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, }, - }, + ], "range": Array [ - 1, - 4, + 21, + 47, ], - "type": "ArrayPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 10, - ], - "type": "ArrowFunctionExpression", - }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 11, + "column": 48, "line": 1, }, "start": Object { @@ -49633,16 +80277,16 @@ Object { }, "range": Array [ 0, - 11, + 48, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -49651,14 +80295,14 @@ Object { }, "range": Array [ 0, - 11, + 49, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -49668,82 +80312,46 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, 3, ], - "type": "Identifier", - "value": "y", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, 4, + 5, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 5, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -49752,16 +80360,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, + 7, 8, ], "type": "Punctuator", - "value": "=>", + "value": ",", }, Object { "loc": Object { @@ -49779,7 +80387,7 @@ Object { 10, ], "type": "Identifier", - "value": "x", + "value": "y", }, Object { "loc": Object { @@ -49797,961 +80405,570 @@ Object { 11, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "ArrayPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 0, - 15, - ], - "type": "ArrowFunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 15, "line": 1, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, "range": Array [ - 1, - 2, + 12, + 15, ], "type": "Punctuator", - "value": "[", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 16, "line": 1, }, "start": Object { - "column": 2, + "column": 15, "line": 1, }, }, "range": Array [ - 2, - 3, + 15, + 16, ], "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ",", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 18, "line": 1, }, "start": Object { - "column": 5, + "column": 17, "line": 1, }, }, "range": Array [ - 5, - 6, + 17, + 18, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 7, + "column": 19, "line": 1, }, }, "range": Array [ - 7, - 8, + 19, + 20, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 22, "line": 1, }, "start": Object { - "column": 8, + "column": 21, "line": 1, }, }, "range": Array [ - 8, - 9, + 21, + 22, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 24, "line": 1, }, "start": Object { - "column": 9, + "column": 23, "line": 1, }, }, "range": Array [ - 9, - 10, + 23, + 24, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 25, "line": 1, }, "start": Object { - "column": 11, + "column": 24, "line": 1, }, }, "range": Array [ - 11, - 13, + 24, + 25, ], "type": "Punctuator", - "value": "=>", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 14, + "column": 26, "line": 1, }, }, "range": Array [ - 14, - 15, + 26, + 27, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { - "column": 15, + "column": 27, "line": 1, }, }, "range": Array [ - 15, - 16, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 10, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 8, - 9, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 7, - 10, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 1, - 11, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 0, - 17, - ], - "type": "ArrowFunctionExpression", - }, "loc": Object { "end": Object { - "column": 18, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 18, + 29, + 30, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 31, "line": 1, }, "start": Object { - "column": 0, + "column": 30, "line": 1, }, }, "range": Array [ - 0, - 1, + 30, + 31, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 33, "line": 1, }, "start": Object { - "column": 1, + "column": 32, "line": 1, }, }, "range": Array [ - 1, - 2, + 32, + 33, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 34, "line": 1, }, "start": Object { - "column": 2, + "column": 33, "line": 1, }, }, "range": Array [ - 2, - 3, + 33, + 34, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 36, "line": 1, }, "start": Object { - "column": 3, + "column": 35, "line": 1, }, }, "range": Array [ - 3, - 4, + 35, + 36, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 37, "line": 1, }, "start": Object { - "column": 5, + "column": 36, "line": 1, }, }, "range": Array [ - 5, - 6, + 36, + 37, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 39, "line": 1, }, "start": Object { - "column": 6, + "column": 38, "line": 1, }, }, "range": Array [ - 6, - 7, + 38, + 39, ], - "type": "Punctuator", - "value": ":", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 40, "line": 1, }, "start": Object { - "column": 7, + "column": 39, "line": 1, }, }, "range": Array [ - 7, - 8, + 39, + 40, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 42, "line": 1, }, "start": Object { - "column": 8, + "column": 41, "line": 1, }, }, "range": Array [ - 8, - 9, + 41, + 42, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 43, "line": 1, }, "start": Object { - "column": 9, + "column": 42, "line": 1, }, }, "range": Array [ - 9, - 10, + 42, + 43, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 45, "line": 1, }, "start": Object { - "column": 10, + "column": 44, "line": 1, }, }, "range": Array [ - 10, - 11, + 44, + 45, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 47, "line": 1, }, "start": Object { - "column": 11, + "column": 46, "line": 1, }, }, "range": Array [ - 11, - 12, + 46, + 47, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 48, "line": 1, }, "start": Object { - "column": 13, + "column": 47, "line": 1, }, }, "range": Array [ - 13, - 15, + 47, + 48, ], "type": "Punctuator", - "value": "=>", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", }, - "start": Object { - "column": 16, - "line": 1, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 16, - 17, ], - "type": "Identifier", - "value": "x", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 26, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, }, + "name": "x", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "init": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 1, - "line": 1, + "column": 8, + "line": 5, }, }, "properties": Array [ @@ -50760,54 +80977,54 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 6, }, }, "name": "foo", "range": Array [ - 2, - 5, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 2, - 8, + 42, + 50, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 6, }, }, - "name": "y", + "name": "foo", "range": Array [ - 7, - 8, + 47, + 50, ], "type": "Identifier", }, @@ -50817,152 +81034,176 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 7, }, }, - "name": "a", + "name": "get", "range": Array [ - 10, - 11, + 56, + 59, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 7, }, }, "method": false, "range": Array [ - 10, - 20, + 56, + 64, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 7, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "name": "get", + "range": Array [ + 61, + 64, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 8, }, - "method": false, - "range": Array [ - 13, - 19, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", + }, + "name": "set", + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, }, }, - ], + "name": "foo", + "range": Array [ + 77, + 80, + ], + "type": "Identifier", + }, "range": Array [ - 12, - 20, + 73, + 80, ], - "type": "ObjectPattern", + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, }, + "range": Array [ + 70, + 80, + ], + "type": "SpreadElement", }, ], "range": Array [ - 1, - 21, + 36, + 82, ], - "type": "ObjectPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 27, - ], - "type": "ArrowFunctionExpression", - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 32, + 82, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, 28, + 83, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -50971,14 +81212,14 @@ Object { }, "range": Array [ 0, - 28, + 84, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -50988,65 +81229,29 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, "range": Array [ - 2, - 5, + 4, + 7, ], "type": "Identifier", "value": "foo", }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, Object { "loc": Object { "end": Object { @@ -51062,131 +81267,113 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], "type": "Punctuator", "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 10, - 11, + 13, + 16, ], "type": "Identifier", - "value": "a", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 12, - 13, + 22, + 25, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 13, - 16, + 25, + 26, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 16, - 17, + 28, + 31, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 18, - 19, + 32, + 33, ], "type": "Identifier", "value": "x", @@ -51194,411 +81381,287 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 19, - 20, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 20, - 21, + 36, + 37, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 21, - 22, + 42, + 45, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 23, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 23, - 25, + 45, + 46, ], "type": "Punctuator", - "value": "=>", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 26, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 26, - 27, + 47, + 50, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 27, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 27, - 28, + 50, + 51, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 7, + "line": 7, }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 7, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 1, - 4, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 0, - 10, - ], - "type": "ArrowFunctionExpression", }, + "range": Array [ + 56, + 59, + ], + "type": "Identifier", + "value": "get", + }, + Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 0, - 11, + 59, + 60, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 0, - 1, + 61, + 64, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 13, + "line": 7, }, "start": Object { - "column": 1, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 1, - 2, + 64, + 65, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 2, - 3, + 70, + 73, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 3, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 3, - 4, + 73, + 76, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 4, - "line": 1, + "column": 10, + "line": 8, }, }, "range": Array [ - 4, - 5, + 76, + 77, ], "type": "Punctuator", - "value": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 6, - 8, + 77, + 80, ], - "type": "Punctuator", - "value": "=>", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 9, - 10, + 81, + 82, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 10, - 11, + 82, + 83, ], "type": "Punctuator", "value": ";", @@ -51608,128 +81671,281 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 0, + "column": 1, "line": 1, }, }, - "params": Array [ + "properties": Array [ Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, }, + }, + "name": "initialize", + "range": Array [ + 7, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 7, + 104, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 2, - "line": 1, + "column": 48, + "line": 2, }, }, - "range": Array [ - 2, - 8, - ], - "right": Object { + "range": Array [ + 51, + 104, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 15, + "line": 2, }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 19, + 26, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 26, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 19, + 26, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 28, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 28, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 28, + 36, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "name": "options", + "range": Array [ + 41, + 48, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 38, + 48, + ], + "type": "RestElement", + }, + ], "range": Array [ - 6, - 8, + 18, + 49, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "ObjectPattern", }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, + ], + "range": Array [ + 17, + 104, + ], + "type": "FunctionExpression", }, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", }, ], "range": Array [ - 0, - 15, + 1, + 106, ], - "type": "ArrowFunctionExpression", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { "column": 0, @@ -51738,16 +81954,35 @@ Object { }, "range": Array [ 0, - 15, + 108, ], "type": "ExpressionStatement", }, ], - "comments": Array [], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 61, + 98, + ], + "type": "Line", + "value": " ... do some stuff with options ...", + }, + ], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -51756,7 +81991,7 @@ Object { }, "range": Array [ 0, - 15, + 109, ], "sourceType": "module", "tokens": Array [ @@ -51794,434 +82029,238 @@ Object { 2, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "line": 2, }, }, "range": Array [ - 6, - 8, + 7, + 17, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "initialize", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 8, - 9, + 17, + 18, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 9, - 10, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 11, - 13, + 19, + 26, ], - "type": "Punctuator", - "value": "=>", + "type": "Identifier", + "value": "someVar", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 1, - 9, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 0, - 15, - ], - "type": "ArrowFunctionExpression", - }, + 26, + 27, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 0, - 15, + 28, + 36, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "otherVar", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 0, - 1, + 36, + 37, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 1, - 2, + 38, + 41, ], "type": "Punctuator", - "value": "{", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 45, + "line": 2, }, "start": Object { - "column": 2, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 2, - 3, + 41, + 48, ], "type": "Identifier", - "value": "x", + "value": "options", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 45, + "line": 2, }, }, "range": Array [ - 4, - 5, + 48, + 49, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 47, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 46, + "line": 2, }, }, "range": Array [ - 6, - 8, + 49, + 50, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 49, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 48, + "line": 2, }, }, "range": Array [ - 8, - 9, + 51, + 52, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 103, + 104, ], "type": "Punctuator", "value": "}", @@ -52229,145 +82268,94 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 9, - 10, + 105, + 106, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 11, - 13, + 106, + 107, ], "type": "Punctuator", - "value": "=>", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 14, - 15, + 107, + 108, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "name": "x", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 1, }, - "name": "z", - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - "range": Array [ - 29, - 35, - ], - "type": "ArrayExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "init": Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 1, + "column": 8, "line": 1, }, }, @@ -52377,263 +82365,278 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "x", + "name": "initialize", "range": Array [ - 2, - 3, + 14, + 24, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 2, }, }, - "method": false, + "method": true, "range": Array [ - 2, - 8, + 14, + 111, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 8, - ], - "right": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 48, + "line": 2, }, }, "range": Array [ - 6, - 8, + 58, + 111, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "type": "BlockStatement", }, - }, - "method": false, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 13, - "line": 1, + "column": 14, + "line": 2, }, }, - "properties": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { "column": 15, - "line": 1, + "line": 2, }, }, - "method": false, - "range": Array [ - 15, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 26, + 33, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 26, + 33, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 26, + 33, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 35, + 43, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 2, }, }, - "name": "z", + "method": false, "range": Array [ - 15, - 16, + 35, + 43, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 35, + 43, + ], + "type": "Identifier", }, }, - "range": Array [ - 15, - 21, - ], - "right": Object { + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "name": "options", + "range": Array [ + 48, + 55, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 45, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 19, - 21, + 45, + 55, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "RestElement", }, - "type": "AssignmentPattern", - }, + ], + "range": Array [ + 25, + 56, + ], + "type": "ObjectPattern", }, ], "range": Array [ - 13, - 23, + 24, + 111, ], - "type": "ObjectPattern", + "type": "FunctionExpression", }, }, ], "range": Array [ - 1, - 24, + 8, + 113, ], - "type": "ObjectPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 35, - ], - "type": "ArrowFunctionExpression", - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 113, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -52642,16 +82645,35 @@ Object { }, "range": Array [ 0, - 35, + 114, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 68, + 105, + ], + "type": "Line", + "value": " ... do some stuff with options ...", }, ], - "comments": Array [], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -52660,14 +82682,14 @@ Object { }, "range": Array [ 0, - 35, + 114, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -52677,241 +82699,241 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 3, + 6, + 7, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, - 5, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 6, - 8, + 14, + 24, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "initialize", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 8, - 9, + 24, + 25, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 10, - 11, + 25, + 26, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 11, - 12, + 26, + 33, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "someVar", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 13, - 14, + 33, + 34, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 15, - 16, + 35, + 43, ], "type": "Identifier", - "value": "z", + "value": "otherVar", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 17, - 18, + 43, + 44, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 19, - 21, + 45, + 48, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 45, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 22, - 23, + 48, + 55, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "options", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 45, + "line": 2, }, }, "range": Array [ - 23, - 24, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -52919,17 +82941,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 47, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 46, + "line": 2, }, }, "range": Array [ - 24, - 25, + 56, + 57, ], "type": "Punctuator", "value": ")", @@ -52937,208 +82959,431 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 49, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 48, + "line": 2, }, }, "range": Array [ - 26, - 28, + 58, + 59, ], "type": "Punctuator", - "value": "=>", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 29, - 30, + 110, + 111, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 30, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 30, - 31, + 112, + 113, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 31, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 31, - 32, + 113, + 114, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", }, - "start": Object { - "column": 33, - "line": 1, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 33, - 34, ], - "type": "Identifier", - "value": "z", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 34, + "column": 0, "line": 1, }, }, "range": Array [ - 34, - 35, + 0, + 26, ], - "type": "Punctuator", - "value": "]", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` -Object { - "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - ], "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 5, }, }, + "name": "x", "range": Array [ - 6, - 9, + 32, + 33, ], - "type": "ArrayPattern", + "type": "Identifier", }, "init": Object { - "elements": Array [], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 5, }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "method": false, + "range": Array [ + 42, + 45, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "method": false, + "range": Array [ + 51, + 54, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 63, + 66, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 60, + 66, + ], + "type": "SpreadElement", + }, + ], "range": Array [ - 12, - 14, + 36, + 68, ], - "type": "ArrayExpression", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 6, - 14, + 32, + 68, ], "type": "VariableDeclarator", }, ], - "kind": "const", + "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 15, + 28, + 69, ], "type": "VariableDeclaration", }, @@ -53146,8 +83391,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -53156,14 +83401,14 @@ Object { }, "range": Array [ 0, - 15, + 70, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -53173,10 +83418,10 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "const", + "value": "var", }, Object { "loc": Object { @@ -53185,16 +83430,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, + 4, 7, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -53211,357 +83456,293 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { "column": 8, - "line": 1, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, }, }, "range": Array [ - 8, - 9, + 16, + 17, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 10, - 11, + 22, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 12, - 13, + 25, + 26, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 13, - 14, + 28, + 31, ], - "type": "Punctuator", - "value": "]", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 14, - 15, + 32, + 33, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "ArrayPattern", - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, }, + }, + "range": Array [ + 34, + 35, ], - "kind": "let", + "type": "Punctuator", + "value": "=", + }, + Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 0, - 13, + 36, + 37, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 0, - 3, + 42, + 45, ], - "type": "Keyword", - "value": "let", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 4, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 4, - 5, + 45, + 46, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 5, - 6, + 51, + 54, ], "type": "Identifier", - "value": "a", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 6, - 7, + 54, + 55, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 8, - 9, + 60, + 63, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 10, - 11, + 63, + 66, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 11, - 12, + 67, + 68, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 12, - 13, + 68, + 69, ], "type": "Punctuator", "value": ";", @@ -53571,7 +83752,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/object-const-named.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` Object { "body": Array [ Object { @@ -53580,128 +83761,348 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 7, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "a", + "name": "foo", "range": Array [ - 7, - 8, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 7, - 10, + 42, + 50, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { "column": 9, - "line": 1, + "line": 6, }, }, - "name": "b", + "name": "foo", "range": Array [ - 9, - 10, + 47, + 50, ], "type": "Identifier", }, }, - ], - "range": Array [ - 6, - 11, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 56, + 59, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "method": false, + "range": Array [ + 56, + 64, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 61, + 64, + ], + "type": "Identifier", + }, }, - "start": Object { - "column": 14, - "line": 1, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 70, + 76, + ], + "type": "SpreadElement", }, - }, - "properties": Array [], + ], "range": Array [ - 14, - 16, + 36, + 78, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 6, - 16, + 32, + 78, ], "type": "VariableDeclarator", }, ], - "kind": "const", + "kind": "var", "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 17, + 28, + 79, ], "type": "VariableDeclaration", }, @@ -53709,8 +84110,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -53719,132 +84120,186 @@ Object { }, "range": Array [ 0, - 17, + 80, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 5, + 7, + 8, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 6, - 7, + 13, + 16, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 1, + "line": 2, }, "start": Object { "column": 7, - "line": 1, + "line": 2, }, }, "range": Array [ - 7, - 8, + 16, + 17, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { "column": 8, - "line": 1, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, }, }, "range": Array [ - 8, - 9, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 9, - 10, + 28, + 31, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 10, - 11, + 32, + 33, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 12, - 13, + 34, + 35, ], "type": "Punctuator", "value": "=", @@ -53852,17 +84307,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 14, - 15, + 36, + 37, ], "type": "Punctuator", "value": "{", @@ -53870,318 +84325,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 15, - 16, + 42, + 45, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 16, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 16, - 17, + 45, + 46, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/object-const-undefined.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 7, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 6, - 9, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 0, - 15, + 47, + 50, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "foo", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 0, - 5, + 50, + 51, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 7, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 6, - 7, + 56, + 59, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 1, + "line": 7, }, "start": Object { "column": 7, - "line": 1, + "line": 7, }, }, "range": Array [ - 7, - 8, + 59, + 60, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { "column": 9, - "line": 1, + "line": 7, + }, + }, + "range": Array [ + 61, + 64, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 7, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 8, - 9, + 64, + 65, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 10, - 11, + 70, + 73, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 12, - 13, + 73, + 76, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 13, - 14, + 77, + 78, ], "type": "Punctuator", "value": "}", @@ -54189,17 +84523,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 14, - 15, + 78, + 79, ], "type": "Punctuator", "value": ";", @@ -54209,127 +84543,181 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 4, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, }, - "method": false, - "range": Array [ - 5, - 8, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", + "start": Object { + "column": 6, + "line": 1, }, }, - ], - "range": Array [ - 4, - 9, - ], - "type": "ObjectPattern", + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, }, - "init": Object { + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, - "properties": Array [], "range": Array [ - 12, - 14, + 9, + 13, ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "type": "SpreadElement", }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", + ], + "range": Array [ + 1, + 16, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { @@ -54339,16 +84727,16 @@ Object { }, "range": Array [ 0, - 15, + 17, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -54357,14 +84745,14 @@ Object { }, "range": Array [ 0, - 15, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -54374,25 +84762,25 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -54400,17 +84788,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 4, "line": 1, }, "start": Object { - "column": 5, + "column": 3, "line": 1, }, }, "range": Array [ - 5, - 6, + 3, + 4, ], "type": "Identifier", "value": "a", @@ -54418,35 +84806,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 8, ], "type": "Identifier", "value": "b", @@ -54454,38 +84842,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 8, - 9, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ - 10, - 11, + 9, + 12, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { @@ -54502,8 +84890,8 @@ Object { 12, 13, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { @@ -54521,32 +84909,50 @@ Object { 14, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ")", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-blockBindings/object-let-undefined.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` Object { "body": Array [ Object { @@ -54563,120 +84969,318 @@ Object { "line": 1, }, }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "a", + "name": "foo", "range": Array [ - 5, - 6, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 5, - 6, + 42, + 50, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 9, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 7, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 59, + 62, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 56, + 62, + ], + "type": "SpreadElement", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, }, }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "name": "set", + "range": Array [ + 71, + 74, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, }, + "range": Array [ + 68, + 74, + ], + "type": "SpreadElement", }, ], "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 10, - 12, + 36, + 76, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 12, + 32, + 76, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "kind": "var", "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 13, + 28, + 77, ], "type": "VariableDeclaration", }, @@ -54684,8 +85288,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -54694,7 +85298,7 @@ Object { }, "range": Array [ 0, - 13, + 78, ], "sourceType": "module", "tokens": Array [ @@ -54714,12 +85318,12 @@ Object { 3, ], "type": "Keyword", - "value": "let", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -54729,542 +85333,349 @@ Object { }, "range": Array [ 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, + 7, ], "type": "Identifier", - "value": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 8, - 9, + 13, + 16, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 10, - 11, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 11, - 12, + 22, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 12, - 13, + 25, + 26, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, - "params": Array [ - Object { - "left": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 20, - ], - "right": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 0, - 24, + 28, + 31, ], - "type": "FunctionDeclaration", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 24, - 25, + 32, + 33, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "x", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 0, - 8, + 34, + 35, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 9, - 10, + 36, + 37, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 10, - 11, + 42, + 45, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 11, - 12, + 45, + 46, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 12, - 13, + 47, + 50, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + "line": 6, }, "start": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 15, - 16, + 50, + 51, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 17, - 18, + 56, + 59, ], "type": "Punctuator", - "value": "[", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 18, - 19, + 59, + 62, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 7, }, "start": Object { - "column": 19, - "line": 1, + "column": 10, + "line": 7, }, }, "range": Array [ - 19, - 20, + 62, + 63, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 20, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 20, - 21, + 68, + 71, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 22, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 22, - 23, + 71, + 74, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 23, - 24, + 75, + 76, ], "type": "Punctuator", "value": "}", @@ -55272,17 +85683,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 24, - 25, + 76, + 77, ], "type": "Punctuator", "value": ";", @@ -55292,260 +85703,68 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-defaultParams/param-object.src 1`] = ` +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, + "block": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 30, + "column": 6, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, - "operator": "=", "range": Array [ - 0, - 30, + 4, + 6, ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "type": "BlockStatement", + }, + "finalizer": null, + "handler": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 1, }, "start": Object { - "column": 4, + "column": 13, "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 26, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 20, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 19, - 26, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 4, - 30, + 13, + 15, ], - "type": "FunctionExpression", + "type": "BlockStatement", }, - "type": "AssignmentExpression", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "param": null, + "range": Array [ + 7, + 15, + ], + "type": "CatchClause", }, "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 1, }, "start": Object { @@ -55555,16 +85774,16 @@ Object { }, "range": Array [ 0, - 31, + 15, ], - "type": "ExpressionStatement", + "type": "TryStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -55573,14 +85792,14 @@ Object { }, "range": Array [ 0, - 31, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -55590,64 +85809,64 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Identifier", - "value": "f", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, "range": Array [ - 2, - 3, + 4, + 5, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 12, + 5, + 6, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 12, - 13, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { @@ -55682,488 +85901,392 @@ Object { 14, 15, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + "block": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, - "start": Object { - "column": 15, - "line": 1, + "range": Array [ + 4, + 6, + ], + "type": "BlockStatement", + }, + "finalizer": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "handler": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "param": null, + "range": Array [ + 7, + 15, + ], + "type": "CatchClause", }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { - "column": 18, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 26, ], - "type": "Punctuator", - "value": "=", + "type": "TryStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 3, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 5, "line": 1, }, "start": Object { - "column": 20, + "column": 4, "line": 1, }, }, "range": Array [ - 20, - 21, + 4, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 6, "line": 1, }, "start": Object { - "column": 21, + "column": 5, "line": 1, }, }, "range": Array [ - 21, - 22, + 5, + 6, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 23, + "column": 7, "line": 1, }, }, "range": Array [ - 23, - 25, + 7, + 12, ], - "type": "Numeric", - "value": "10", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 14, "line": 1, }, "start": Object { - "column": 25, + "column": 13, "line": 1, }, }, "range": Array [ - 25, - 26, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 15, "line": 1, }, "start": Object { - "column": 26, + "column": 14, "line": 1, }, }, "range": Array [ - 26, - 27, + 14, + 15, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 23, "line": 1, }, "start": Object { - "column": 28, + "column": 16, "line": 1, }, }, "range": Array [ - 28, - 29, + 16, + 23, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "finally", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 25, "line": 1, }, "start": Object { - "column": 29, + "column": 24, "line": 1, }, }, "range": Array [ - 29, - 30, + 24, + 25, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 26, "line": 1, }, "start": Object { - "column": 30, + "column": 25, "line": 1, }, }, "range": Array [ - 30, - 31, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` +exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "init": Object { + "left": Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 2, + "column": 8, "line": 1, }, }, - "name": "f", "range": Array [ - 2, - 3, + 8, + 9, ], - "type": "Identifier", + "raw": "2", + "type": "Literal", + "value": 2, }, - "kind": "init", "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 2, + "column": 8, "line": 1, }, }, - "method": true, + "operator": "**", "range": Array [ - 2, - 21, + 8, + 14, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "right": Object { "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 3, + "column": 13, "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 11, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 10, - 17, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 3, - 21, + 13, + 14, ], - "type": "FunctionExpression", + "raw": "3", + "type": "Literal", + "value": 3, }, + "type": "BinaryExpression", }, - ], - "range": Array [ - 1, - 22, - ], - "type": "ObjectExpression", - }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { @@ -56173,6 +86296,78 @@ Object { }, "range": Array [ 0, + 15, + ], + "type": "VariableDeclaration", + }, + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "operator": "**=", + "range": Array [ + 16, + 23, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 16, 24, ], "type": "ExpressionStatement", @@ -56181,8 +86376,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -56191,14 +86386,14 @@ Object { }, "range": Array [ 0, - 24, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -56208,169 +86403,133 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, 3, ], - "type": "Identifier", - "value": "f", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, 4, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 5, + 6, + 7, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, "range": Array [ - 5, - 6, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 12, ], "type": "Punctuator", - "value": "}", + "value": "**", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 14, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, - 11, + 14, + 15, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], "type": "Identifier", "value": "x", @@ -56378,143 +86537,206 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 12, - 13, + 18, + 21, ], "type": "Punctuator", - "value": ":", + "value": "**=", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 14, - 16, + 22, + 23, ], "type": "Numeric", - "value": "10", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/for/for-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "EmptyStatement", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 9, "line": 1, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 9, ], - "type": "Punctuator", - "value": "}", + "test": null, + "type": "ForStatement", + "update": null, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 10, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 3, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 3, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 4, "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 7, "line": 1, }, "start": Object { - "column": 21, + "column": 6, "line": 1, }, }, "range": Array [ - 21, - 22, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 8, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 8, ], "type": "Punctuator", "value": ")", @@ -56522,17 +86744,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 9, "line": 1, }, "start": Object { - "column": 23, + "column": 8, "line": 1, }, }, "range": Array [ - 23, - 24, + 8, + 9, ], "type": "Punctuator", "value": ";", @@ -56542,68 +86764,105 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-forOf/loop.src 1`] = ` +exports[`javascript fixtures/for/for-loop.src 1`] = ` Object { "body": Array [ Object { - "await": false, "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { - "column": 16, + "column": 28, "line": 1, }, }, "range": Array [ - 16, - 17, + 28, + 30, ], - "type": "EmptyStatement", + "type": "BlockStatement", }, - "left": Object { - "elements": Array [ + "init": Object { + "declarations": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, - "name": "a", "range": Array [ - 6, - 7, + 8, + 13, ], - "type": "Identifier", + "type": "VariableDeclarator", }, ], + "kind": "var", "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, "range": Array [ - 5, - 8, + 4, + 13, ], - "type": "ArrayPattern", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { @@ -56613,27 +86872,101 @@ Object { }, "range": Array [ 0, - 17, + 30, ], - "right": Object { + "test": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, + "column": 21, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, - "name": "foo", + "operator": "<", "range": Array [ - 12, 15, + 21, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "BinaryExpression", + }, + "type": "ForStatement", + "update": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "operator": "++", + "prefix": false, + "range": Array [ + 23, + 26, + ], + "type": "UpdateExpression", }, - "type": "ForOfStatement", }, ], "comments": Array [], @@ -56649,7 +86982,7 @@ Object { }, "range": Array [ 0, - 18, + 31, ], "sourceType": "module", "tokens": Array [ @@ -56674,17 +87007,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { - "column": 4, + "column": 3, "line": 1, }, }, "range": Array [ + 3, 4, - 5, ], "type": "Punctuator", "value": "(", @@ -56692,383 +87025,579 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, "range": Array [ - 5, - 6, + 4, + 7, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 12, "line": 1, }, }, "range": Array [ - 6, - 7, + 12, + 13, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, "range": Array [ - 7, - 8, + 17, + 18, ], "type": "Punctuator", - "value": "]", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 21, "line": 1, }, "start": Object { - "column": 9, + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, "line": 1, }, }, "range": Array [ - 9, - 11, + 24, + 26, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 12, + "column": 26, "line": 1, }, }, "range": Array [ - 12, - 15, + 26, + 27, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 29, "line": 1, }, "start": Object { - "column": 15, + "column": 28, "line": 1, }, }, "range": Array [ - 15, - 16, + 28, + 29, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { - "column": 16, + "column": 29, "line": 1, }, }, "range": Array [ - 16, - 17, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +exports[`javascript fixtures/for/for-with-coma.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 41, + 44, + ], + "type": "BlockStatement", + }, + "init": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 3, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, + "name": "i", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + "start": Object { + "column": 13, + "line": 1, }, - ], + }, "range": Array [ - 1, - 9, + 13, + 14, ], - "type": "ObjectPattern", + "raw": "0", + "type": "Literal", + "value": 0, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, - "name": "c", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", }, + "name": "j", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 20, "line": 1, }, }, "range": Array [ - 11, - 15, + 20, + 22, ], - "type": "RestElement", + "raw": "10", + "type": "Literal", + "value": 10, }, - ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "test": Object { + "left": Object { "loc": Object { "end": Object { - "column": 16, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, + "name": "i", "range": Array [ - 0, - 16, + 24, + 25, ], - "type": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, - "operator": "=", + "operator": "<", "range": Array [ - 0, - 20, + 24, + 29, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 19, + "column": 28, "line": 1, }, }, - "name": "d", + "name": "j", "range": Array [ - 19, - 20, + 28, + 29, ], "type": "Identifier", }, - "type": "AssignmentExpression", + "type": "BinaryExpression", }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ForStatement", + "update": Object { + "expressions": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "operator": "++", + "prefix": false, + "range": Array [ + 31, + 34, + ], + "type": "UpdateExpression", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "operator": "--", + "prefix": false, + "range": Array [ + 36, + 39, + ], + "type": "UpdateExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, }, + "range": Array [ + 31, + 39, + ], + "type": "SequenceExpression", }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -57077,14 +87606,14 @@ Object { }, "range": Array [ 0, - 21, + 46, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -57094,46 +87623,10 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ 3, - 4, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { @@ -57149,45 +87642,27 @@ Object { "range": Array [ 4, 5, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 8, - 9, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { @@ -57204,13 +87679,13 @@ Object { 9, 10, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { @@ -57220,87 +87695,87 @@ Object { }, "range": Array [ 11, - 14, + 12, ], "type": "Punctuator", - "value": "...", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 14, - 15, ], - "type": "Identifier", - "value": "c", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ + 16, 17, - 18, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { - "column": 19, + "column": 18, "line": 1, }, }, "range": Array [ + 18, 19, - 20, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 22, "line": 1, }, "start": Object { @@ -57310,631 +87785,423 @@ Object { }, "range": Array [ 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 13, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, + 22, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "10", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 1, + 22, + 23, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 25, "line": 1, }, "start": Object { - "column": 1, + "column": 24, "line": 1, }, }, "range": Array [ - 1, - 2, + 24, + 25, ], "type": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 27, "line": 1, }, "start": Object { - "column": 2, + "column": 26, "line": 1, }, }, "range": Array [ - 2, - 3, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 29, "line": 1, }, "start": Object { - "column": 4, + "column": 28, "line": 1, }, }, "range": Array [ - 4, - 7, + 28, + 29, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 30, "line": 1, }, "start": Object { - "column": 7, + "column": 29, "line": 1, }, }, "range": Array [ - 7, - 8, + 29, + 30, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 32, "line": 1, }, "start": Object { - "column": 8, + "column": 31, "line": 1, }, }, "range": Array [ - 8, - 9, + 31, + 32, ], "type": "Identifier", - "value": "b", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 34, "line": 1, }, "start": Object { - "column": 9, + "column": 32, "line": 1, }, }, "range": Array [ - 9, - 10, + 32, + 34, ], "type": "Punctuator", - "value": ",", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 35, "line": 1, }, "start": Object { - "column": 11, + "column": 34, "line": 1, }, }, "range": Array [ - 11, - 12, + 34, + 35, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 37, "line": 1, }, "start": Object { - "column": 12, + "column": 36, "line": 1, }, }, "range": Array [ - 12, - 13, + 36, + 37, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 39, "line": 1, }, "start": Object { - "column": 13, + "column": 37, "line": 1, }, }, "range": Array [ - 13, - 14, + 37, + 39, ], "type": "Punctuator", - "value": "]", + "value": "--", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 40, "line": 1, }, "start": Object { - "column": 15, + "column": 39, "line": 1, }, }, "range": Array [ - 15, - 16, + 39, + 40, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 17, - 18, + 41, + 42, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 43, + 44, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` +exports[`javascript fixtures/for/for-with-const.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "ok", - "range": Array [ - 22, - 24, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "BlockStatement", + }, + "init": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, - "range": Array [ - 21, - 25, - ], - "type": "ArrayPattern", }, + "name": "i", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 25, + 15, + 16, ], - "type": "RestElement", + "raw": "0", + "type": "Literal", + "value": 0, }, - ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 16, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "test": Object { + "left": Object { "loc": Object { "end": Object { - "column": 26, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, + "name": "i", "range": Array [ - 11, - 26, + 18, + 19, ], - "type": "ArrayPattern", + "type": "Identifier", }, - ], - "range": Array [ - 0, - 30, - ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, - "start": Object { - "column": 30, - "line": 1, + "operator": "<", + "range": Array [ + 18, + 23, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", }, + "type": "BinaryExpression", }, - "range": Array [ - 30, - 31, - ], - "type": "EmptyStatement", + "type": "ForStatement", + "update": null, }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -57943,14 +88210,14 @@ Object { }, "range": Array [ 0, - 31, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -57960,46 +88227,46 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 10, + 4, + 5, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 10, - 11, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { @@ -58016,26 +88283,8 @@ Object { 11, 12, ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], "type": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { @@ -58053,7 +88302,7 @@ Object { 14, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -58070,8 +88319,8 @@ Object { 15, 16, ], - "type": "Identifier", - "value": "b", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { @@ -58089,12 +88338,12 @@ Object { 17, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { @@ -58104,33 +88353,33 @@ Object { }, "range": Array [ 18, - 21, + 19, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 20, "line": 1, }, }, "range": Array [ + 20, 21, - 22, ], "type": "Punctuator", - "value": "[", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { @@ -58140,56 +88389,56 @@ Object { }, "range": Array [ 22, - 24, + 23, ], "type": "Identifier", - "value": "ok", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 24, "line": 1, }, "start": Object { - "column": 24, + "column": 23, "line": 1, }, }, "range": Array [ + 23, 24, - 25, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 25, "line": 1, }, "start": Object { - "column": 25, + "column": 24, "line": 1, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ @@ -58197,17 +88446,17 @@ Object { 27, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ @@ -58215,291 +88464,267 @@ Object { 29, ], "type": "Punctuator", - "value": "{", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/for/for-with-function.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + "body": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, }, - "start": Object { - "column": 29, - "line": 1, + "range": Array [ + 41, + 42, + ], + "type": "EmptyStatement", + }, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 5, + 10, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "raw": "5", + "type": "Literal", + "value": 5, }, + "type": "AssignmentExpression", }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { - "column": 31, + "column": 42, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 42, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { + "test": Object { "left": Object { - "elements": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 12, + 33, + ], + "right": Object { + "arguments": Array [], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, + "start": Object { + "column": 16, + "line": 1, }, + }, + "name": "x", + "range": Array [ + 16, + 17, ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "toExponential", "range": Array [ - 7, - 15, + 18, + 31, ], - "type": "ObjectPattern", + "type": "Identifier", }, - ], + "range": Array [ + 16, + 31, + ], + "type": "MemberExpression", + }, "loc": Object { "end": Object { - "column": 16, + "column": 33, "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, 16, + 33, ], - "type": "ArrayPattern", + "type": "CallExpression", + }, + "type": "AssignmentExpression", + }, + "type": "ForStatement", + "update": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 20, + "column": 40, "line": 1, }, "start": Object { - "column": 0, + "column": 35, "line": 1, }, }, "operator": "=", "range": Array [ - 0, - 20, + 35, + 40, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 40, "line": 1, }, "start": Object { - "column": 19, + "column": 39, "line": 1, }, }, - "name": "d", "range": Array [ - 19, - 20, + 39, + 40, ], - "type": "Identifier", + "raw": "5", + "type": "Literal", + "value": 5, }, "type": "AssignmentExpression", }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", }, ], "comments": Array [], @@ -58515,14 +88740,14 @@ Object { }, "range": Array [ 0, - 22, + 43, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -58532,28 +88757,10 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, + 3, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { @@ -58570,8 +88777,8 @@ Object { 4, 5, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -58588,8 +88795,8 @@ Object { 5, 6, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -58607,7 +88814,7 @@ Object { 8, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { @@ -58624,8 +88831,8 @@ Object { 9, 10, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { @@ -58643,7 +88850,7 @@ Object { 11, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { @@ -58661,7 +88868,7 @@ Object { 13, ], "type": "Identifier", - "value": "b", + "value": "x", }, Object { "loc": Object { @@ -58679,25 +88886,25 @@ Object { 15, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 17, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -58715,40 +88922,166 @@ Object { 18, ], "type": "Punctuator", - "value": "=", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 31, "line": 1, }, "start": Object { - "column": 19, + "column": 18, "line": 1, }, }, "range": Array [ - 19, - 20, + 18, + 31, ], "type": "Identifier", - "value": "d", + "value": "toExponential", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 32, "line": 1, }, "start": Object { - "column": 20, + "column": 31, "line": 1, }, }, "range": Array [ - 20, - 21, + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Numeric", + "value": "5", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, ], "type": "Punctuator", "value": ";", @@ -58758,140 +89091,179 @@ Object { } `; -exports[`ecmaFeatures fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` +exports[`javascript fixtures/for/for-with-let.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "BlockStatement", + }, + "init": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 2, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 11, "line": 1, }, }, - "name": "a", + "name": "i", "range": Array [ - 1, - 2, + 11, + 12, ], "type": "Identifier", }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, + "init": Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 4, + "column": 15, "line": 1, }, }, "range": Array [ - 4, - 8, + 15, + 16, ], - "type": "RestElement", + "raw": "0", + "type": "Literal", + "value": 0, }, - ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 16, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "test": Object { + "left": Object { "loc": Object { "end": Object { - "column": 9, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, + "name": "i", "range": Array [ - 0, - 9, + 18, + 19, ], - "type": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, - "operator": "=", + "operator": "<", "range": Array [ - 0, - 13, + 18, + 23, ], "right": Object { "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 22, "line": 1, }, }, - "name": "c", + "name": "j", "range": Array [ - 12, - 13, + 22, + 23, ], "type": "Identifier", }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "BinaryExpression", }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", + "type": "ForStatement", + "update": null, }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -58900,14 +89272,14 @@ Object { }, "range": Array [ 0, - 14, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -58917,257 +89289,293 @@ Object { }, "range": Array [ 0, - 1, + 3, + ], + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, "range": Array [ - 1, - 2, + 5, + 10, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { - "column": 2, + "column": 11, "line": 1, }, }, "range": Array [ - 2, - 3, + 11, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 13, "line": 1, }, }, "range": Array [ - 4, - 7, + 13, + 14, ], "type": "Punctuator", - "value": "...", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, "range": Array [ - 7, - 8, + 15, + 16, ], - "type": "Identifier", - "value": "b", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 17, "line": 1, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, "range": Array [ - 8, - 9, + 16, + 17, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Punctuator", - "value": "=", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 22, "line": 1, }, }, "range": Array [ - 12, - 13, + 22, + 23, ], "type": "Identifier", - "value": "c", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 24, "line": 1, }, "start": Object { - "column": 13, + "column": 23, "line": 1, }, }, "range": Array [ - 13, - 14, + 23, + 24, ], "type": "Punctuator", "value": ";", }, + 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": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-spread/single-destructured.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - }, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 10, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, - "operator": "=", "range": Array [ - 0, - 10, + 14, + 16, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "name": "b", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", }, - "type": "AssignmentExpression", + "name": "i", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { @@ -59177,16 +89585,34 @@ Object { }, "range": Array [ 0, - 11, + 16, ], - "type": "ExpressionStatement", + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "ArrayExpression", + }, + "type": "ForInStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -59195,14 +89621,14 @@ Object { }, "range": Array [ 0, - 11, + 17, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -59212,61 +89638,97 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, 4, + 5, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, 5, + 6, ], "type": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, "range": Array [ - 5, - 6, + 7, + 9, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, ], "type": "Punctuator", "value": "]", @@ -59274,313 +89736,780 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forIn/for-in-bare-nonstrict.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "effects", + "range": Array [ + 4, + 11, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 15, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 0, "line": 1, }, }, "range": Array [ - 7, - 8, + 0, + 16, ], - "type": "Punctuator", - "value": "=", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "iterations", + "range": Array [ + 21, + 31, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 35, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 9, - 10, + 17, + 36, ], - "type": "Identifier", - "value": "b", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "stored", + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 10, - 11, + 37, + 48, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 5, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "init", + "name": "iterations", + "range": Array [ + 119, + 129, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "operator": "++", + "prefix": true, + "range": Array [ + 117, + 129, + ], + "type": "UpdateExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 117, + 130, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 64, + "line": 4, + }, + }, + "range": Array [ + 113, + 132, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 58, + 59, + ], + "type": "Identifier", + }, + "init": Object { + "expressions": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 23, + "line": 4, }, "start": Object { - "column": 7, - "line": 1, + "column": 16, + "line": 4, }, }, - "method": false, + "name": "effects", "range": Array [ - 7, - 8, + 65, + 72, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 23, + "line": 4, }, - "kind": "init", + "start": Object { + "column": 14, + "line": 4, + }, + }, + "operator": "++", + "prefix": true, + "range": Array [ + 63, + 72, + ], + "type": "UpdateExpression", + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 27, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 26, + "line": 4, }, }, - "method": false, - "range": Array [ - 10, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", + "range": Array [ + 75, + 76, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "operator": "-", + "prefix": true, + "range": Array [ + 74, + 76, + ], + "type": "UnaryExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 63, + 76, + ], + "type": "SequenceExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 58, + 77, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 54, + 77, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 49, + 132, + ], + "right": Object { + "expressions": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "name": "stored", + "range": Array [ + 81, + 87, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "operator": "=", + "range": Array [ + 81, + 91, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 41, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 90, + 91, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 4, + }, + "start": Object { + "column": 44, + "line": 4, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 4, + }, + "start": Object { + "column": 45, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 94, + 95, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 49, + "line": 4, + }, + "start": Object { + "column": 45, + "line": 4, + }, + }, + "method": false, + "range": Array [ + 94, + 98, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 4, + }, + "start": Object { + "column": 48, + "line": 4, + }, + }, + "range": Array [ + 97, + 98, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 4, + }, + "start": Object { + "column": 51, + "line": 4, }, }, - ], + "name": "b", + "range": Array [ + 100, + 101, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 55, + "line": 4, + }, + "start": Object { + "column": 51, + "line": 4, + }, + }, + "method": false, "range": Array [ - 5, - 13, + 100, + 104, ], - "type": "ObjectPattern", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 4, + }, + "start": Object { + "column": 54, + "line": 4, + }, + }, + "range": Array [ + 103, + 104, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, }, Object { - "argument": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 58, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 57, + "line": 4, }, }, "name": "c", "range": Array [ - 18, - 19, + 106, + 107, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 61, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 57, + "line": 4, }, }, + "method": false, "range": Array [ - 15, - 19, + 106, + 110, ], - "type": "RestElement", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 4, + }, + "start": Object { + "column": 60, + "line": 4, + }, + }, + "range": Array [ + 109, + 110, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, }, ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, "range": Array [ - 4, - 20, + 93, + 111, ], - "type": "ArrayPattern", + "type": "ObjectExpression", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 62, + "line": 4, }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 32, + "line": 4, }, - "range": Array [ - 4, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, }, + "range": Array [ + 81, + 111, + ], + "type": "SequenceExpression", }, - "range": Array [ - 0, - 25, - ], - "type": "VariableDeclaration", + "type": "ForInStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 7, }, "start": Object { "column": 0, @@ -59589,7 +90518,7 @@ Object { }, "range": Array [ 0, - 25, + 133, ], "sourceType": "module", "tokens": Array [ @@ -59614,7 +90543,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { @@ -59624,82 +90553,10 @@ Object { }, "range": Array [ 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, 11, ], "type": "Identifier", - "value": "b", + "value": "effects", }, Object { "loc": Object { @@ -59717,30 +90574,30 @@ Object { 13, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 15, ], - "type": "Punctuator", - "value": ",", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { @@ -59750,61 +90607,61 @@ Object { }, "range": Array [ 15, - 18, + 16, ], "type": "Punctuator", - "value": "...", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 3, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 18, - 19, + 17, + 20, ], - "type": "Identifier", - "value": "c", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 19, - 20, + 21, + 31, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "iterations", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 21, - 22, + 32, + 33, ], "type": "Punctuator", "value": "=", @@ -59812,279 +90669,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 23, - 24, + 34, + 35, ], - "type": "Identifier", - "value": "d", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 24, - 25, + 35, + 36, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 18, - ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", + "loc": Object { + "end": Object { + "column": 3, + "line": 3, }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 40, ], - "kind": "var", + "type": "Keyword", + "value": "var", + }, + Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 23, + 41, + 47, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, + "type": "Identifier", + "value": "stored", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 3, + 49, + 52, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 4, }, "start": Object { "column": 4, - "line": 1, + "line": 4, }, }, "range": Array [ - 4, - 5, + 53, + 54, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { "column": 5, - "line": 1, + "line": 4, }, }, "range": Array [ - 5, - 6, + 54, + 57, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 58, + 59, ], "type": "Identifier", "value": "a", @@ -60092,89 +90831,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 4, }, }, "range": Array [ - 6, - 7, + 60, + 61, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 13, + "line": 4, }, }, "range": Array [ - 8, - 11, + 62, + 63, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 11, - 12, + 63, + 65, ], "type": "Punctuator", - "value": "[", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 23, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 12, - 13, + 65, + 72, ], "type": "Identifier", - "value": "b", + "value": "effects", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 13, - "line": 1, + "column": 23, + "line": 4, }, }, "range": Array [ - 13, - 14, + 72, + 73, ], "type": "Punctuator", "value": ",", @@ -60182,548 +90921,612 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 4, }, }, "range": Array [ - 15, - 16, + 74, + 75, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 75, + 76, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 78, + 80, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "range": Array [ + 81, + 87, ], "type": "Identifier", - "value": "c", + "value": "stored", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 40, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 39, + "line": 4, }, }, "range": Array [ - 16, - 17, + 88, + 89, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 42, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 41, + "line": 4, }, }, "range": Array [ - 17, - 18, + 90, + 91, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 4, + }, + "start": Object { + "column": 42, + "line": 4, + }, + }, + "range": Array [ + 91, + 92, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 45, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 44, + "line": 4, }, }, "range": Array [ - 19, - 20, + 93, + 94, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 46, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 45, + "line": 4, }, }, "range": Array [ - 21, - 22, + 94, + 95, ], "type": "Identifier", - "value": "d", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 47, + "line": 4, }, "start": Object { - "column": 22, - "line": 1, + "column": 46, + "line": 4, }, }, "range": Array [ - 22, - 23, + 95, + 96, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/destructuring-and-spread/var-multi-destructured.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 13, - ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", + "loc": Object { + "end": Object { + "column": 49, + "line": 4, + }, + "start": Object { + "column": 48, + "line": 4, + }, + }, + "range": Array [ + 97, + 98, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 4, + }, + "start": Object { + "column": 49, + "line": 4, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 4, + }, + "start": Object { + "column": 51, + "line": 4, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 4, + }, + "start": Object { + "column": 52, + "line": 4, + }, + }, + "range": Array [ + 101, + 102, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 4, + }, + "start": Object { + "column": 54, + "line": 4, }, + }, + "range": Array [ + 103, + 104, ], - "kind": "var", + "type": "Numeric", + "value": "1", + }, + Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 56, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 55, + "line": 4, }, }, "range": Array [ - 0, - 18, + 104, + 105, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 58, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 57, + "line": 4, }, }, "range": Array [ - 0, - 3, + 106, + 107, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 59, + "line": 4, }, "start": Object { - "column": 4, - "line": 1, + "column": 58, + "line": 4, }, }, "range": Array [ - 4, - 5, + 107, + 108, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 61, + "line": 4, }, "start": Object { - "column": 5, - "line": 1, + "column": 60, + "line": 4, }, }, "range": Array [ - 5, - 6, + 109, + 110, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 62, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 61, + "line": 4, }, }, "range": Array [ - 6, - 7, + 110, + 111, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 63, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 62, + "line": 4, }, }, "range": Array [ - 8, - 11, + 111, + 112, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 65, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 64, + "line": 4, }, }, "range": Array [ - 11, - 12, + 113, + 114, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 12, - 13, + 117, + 119, ], "type": "Punctuator", - "value": "]", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 14, - 15, + 119, + 129, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "iterations", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 16, - 17, + 129, + 130, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 17, - 18, + 131, + 132, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-destruction.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "argument": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, - "name": "a", + "name": "name", "range": Array [ - 8, - 9, + 10, + 14, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "range": Array [ - 5, - 9, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, }, + "range": Array [ + 9, + 22, + ], + "type": "ArrayPattern", }, - "range": Array [ - 4, - 10, - ], - "type": "ArrayPattern", - }, - "init": Object { + "init": null, "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, - "name": "b", "range": Array [ - 13, - 14, + 9, + 22, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 15, + "column": 33, "line": 1, }, "start": Object { @@ -60733,16 +91536,34 @@ Object { }, "range": Array [ 0, - 15, + 33, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -60751,7 +91572,7 @@ Object { }, "range": Array [ 0, - 15, + 34, ], "sourceType": "module", "tokens": Array [ @@ -60771,7 +91592,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -60789,216 +91610,43 @@ Object { 5, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/experimentalAsyncIteration/async-generators.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 0, + "column": 5, "line": 1, }, }, - "params": Array [], "range": Array [ - 0, - 26, + 5, + 8, ], - "type": "FunctionDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "var", }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 5, + 9, + 10, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { @@ -61007,16 +91655,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, + 10, 14, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { @@ -61034,12 +91682,12 @@ Object { 15, ], "type": "Punctuator", - "value": "*", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 21, "line": 1, }, "start": Object { @@ -61049,43 +91697,79 @@ Object { }, "range": Array [ 16, - 19, + 21, ], "type": "Identifier", - "value": "foo", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 21, "line": 1, }, }, "range": Array [ - 19, - 20, + 21, + 22, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 20, + "column": 23, "line": 1, }, }, "range": Array [ - 20, - 21, + 23, + 25, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "obj", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, ], "type": "Punctuator", "value": ")", @@ -61093,17 +91777,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 32, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 23, + 31, + 32, ], "type": "Punctuator", "value": "{", @@ -61111,17 +91795,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 32, + "line": 1, }, }, "range": Array [ - 25, - 26, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -61131,183 +91815,239 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalAsyncIteration/async-iterator.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-destruction-object.src 1`] = ` Object { "body": Array [ Object { - "async": true, "body": Object { - "body": Array [ + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ Object { - "await": true, - "body": Object { - "body": Array [], + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 9, + "line": 1, }, }, - "range": Array [ - 59, - 67, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ + "properties": Array [ Object { - "id": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 1, }, }, - "name": "item", + "name": "name", "range": Array [ - 44, - 48, + 10, + 14, ], "type": "Identifier", }, - "init": null, + "kind": "init", "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { "column": 21, - "line": 2, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, }, + "method": false, "range": Array [ - 44, - 48, + 16, + 21, ], - "type": "VariableDeclarator", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, }, ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, "range": Array [ - 38, - 48, + 9, + 22, ], - "type": "VariableDeclaration", + "type": "ObjectPattern", }, + "init": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 27, - 67, + 9, + 22, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "name": "items", - "range": Array [ - 52, - 57, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 1, + "type": "VariableDeclarator", }, - }, - "range": Array [ - 21, - 69, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { + "kind": "var", "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, - "name": "foo", "range": Array [ - 15, - 18, + 5, + 22, ], - "type": "Identifier", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 69, + 33, ], - "type": "FunctionDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -61316,14 +92056,14 @@ Object { }, "range": Array [ 0, - 70, + 34, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -61333,61 +92073,25 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, + 3, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 5, "line": 1, }, "start": Object { - "column": 18, + "column": 4, "line": 1, }, }, "range": Array [ - 18, - 19, + 4, + 5, ], "type": "Punctuator", "value": "(", @@ -61395,35 +92099,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 8, "line": 1, }, "start": Object { - "column": 19, + "column": 5, "line": 1, }, }, "range": Array [ - 19, - 20, + 5, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 21, + "column": 9, "line": 1, }, }, "range": Array [ - 21, - 22, + 9, + 10, ], "type": "Punctuator", "value": "{", @@ -61431,197 +92135,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 31, - 36, + 10, + 14, ], "type": "Identifier", - "value": "await", + "value": "name", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, + "line": 1, }, - "start": Object { - "column": 15, - "line": 2, + "start": Object { + "column": 14, + "line": 1, }, }, "range": Array [ - 38, - 43, + 14, + 15, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 44, - 48, + 16, + 21, ], "type": "Identifier", - "value": "item", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 49, - 51, + 21, + 22, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 52, - 57, + 23, + 25, ], - "type": "Identifier", - "value": "items", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 34, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 57, - 58, + 26, + 29, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 59, - 60, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 32, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 31, + "line": 1, }, }, "range": Array [ - 66, - 67, + 31, + 32, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 32, + "line": 1, }, }, "range": Array [ - 68, - 69, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -61631,141 +92299,51 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-object.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/forIn/for-in-object-with-body.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "main", - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Import", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "CallExpression", + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, }, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "then", - "range": Array [ - 14, - 18, - ], - "type": "Identifier", + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 0, - 18, - ], - "type": "MemberExpression", }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "left": Object { "loc": Object { "end": Object { - "column": 24, + "column": 6, "line": 1, }, "start": Object { - "column": 0, + "column": 5, "line": 1, }, }, + "name": "i", "range": Array [ - 0, - 24, + 5, + 6, ], - "type": "CallExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { @@ -61775,9 +92353,27 @@ Object { }, "range": Array [ 0, - 25, + 16, ], - "type": "ExpressionStatement", + "right": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 10, + 12, + ], + "type": "ObjectExpression", + }, + "type": "ForInStatement", }, ], "comments": Array [], @@ -61793,14 +92389,14 @@ Object { }, "range": Array [ 0, - 26, + 17, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -61810,25 +92406,25 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "import", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Punctuator", "value": "(", @@ -61836,323 +92432,317 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, - 12, + 5, + 6, ], - "type": "String", - "value": "'foo'", + "type": "Identifier", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { - "column": 12, + "column": 7, "line": 1, }, }, "range": Array [ - 12, - 13, + 7, + 9, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 13, + "column": 10, "line": 1, }, }, "range": Array [ - 13, - 14, + 10, + 11, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "then", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 1, }, "start": Object { - "column": 19, + "column": 12, "line": 1, }, }, "range": Array [ - 19, - 23, + 12, + 13, ], - "type": "Identifier", - "value": "main", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, "range": Array [ - 23, - 24, + 14, + 15, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, "range": Array [ - 24, - 25, + 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-assigment.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 25, + 32, + ], + "type": "Identifier", }, - "start": Object { - "column": 22, - "line": 1, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, + "range": Array [ + 25, + 35, + ], + "type": "CallExpression", }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 36, "line": 1, }, "start": Object { - "column": 9, + "column": 25, "line": 1, }, }, - "name": "c", "range": Array [ - 9, - 10, + 25, + 36, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "ExpressionStatement", }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", + "left": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, - "method": false, + "name": "x", "range": Array [ - 12, - 13, + 9, + 10, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, + "init": Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 15, - 19, ], - "type": "RestElement", + "raw": "42", + "type": "Literal", + "value": 42, }, - ], - "range": Array [ - 11, - 20, - ], - "type": "ObjectPattern", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, - ], + "range": Array [ + 5, + 15, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 24, + 36, ], - "type": "FunctionDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 19, + 23, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], @@ -62168,14 +92758,14 @@ Object { }, "range": Array [ 0, - 25, + 37, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -62185,46 +92775,64 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 10, + 4, + 5, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { "column": 10, "line": 1, }, + "start": Object { + "column": 9, + "line": 1, + }, }, "range": Array [ + 9, 10, - 11, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -62242,404 +92850,253 @@ Object { 12, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 15, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 18, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, "range": Array [ - 15, - 18, + 19, + 23, + ], + "type": "Identifier", + "value": "list", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 32, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, - 19, + 25, + 32, ], "type": "Identifier", - "value": "b", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 33, "line": 1, }, "start": Object { - "column": 19, + "column": 32, "line": 1, }, }, "range": Array [ - 19, - 20, + 32, + 33, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 34, "line": 1, }, "start": Object { - "column": 20, + "column": 33, "line": 1, }, }, "range": Array [ - 20, - 21, + 33, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 35, "line": 1, }, "start": Object { - "column": 22, + "column": 34, "line": 1, }, }, "range": Array [ - 22, - 23, + 34, + 35, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 36, "line": 1, }, "start": Object { - "column": 23, + "column": 35, "line": 1, }, }, "range": Array [ - 23, - 24, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-bare-assigment.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "body": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "EmptyStatement", + }, + "left": Object { "left": Object { "loc": Object { "end": Object { - "column": 10, + "column": 6, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "RestElement", - }, - ], + "name": "x", "range": Array [ - 1, - 10, + 5, + 6, ], - "type": "ObjectPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, - "operator": "=", "range": Array [ - 1, - 22, + 5, + 10, ], "right": Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "SpreadElement", - }, - ], "range": Array [ - 13, - 22, + 9, + 10, ], - "type": "ObjectExpression", + "raw": "0", + "type": "Literal", + "value": 0, }, - "type": "AssignmentExpression", + "type": "AssignmentPattern", }, "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { @@ -62649,9 +93106,27 @@ Object { }, "range": Array [ 0, - 23, + 19, ], - "type": "ExpressionStatement", + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "arr", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], @@ -62667,14 +93142,14 @@ Object { }, "range": Array [ 0, - 24, + 20, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -62684,7 +93159,25 @@ Object { }, "range": Array [ 0, - 1, + 3, + ], + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, ], "type": "Punctuator", "value": "(", @@ -62692,92 +93185,353 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 6, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, "range": Array [ - 1, - 2, + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 10, "line": 1, }, "start": Object { - "column": 2, + "column": 9, "line": 1, }, }, "range": Array [ - 2, - 3, + 9, + 10, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, ], "type": "Identifier", - "value": "a", + "value": "arr", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 18, "line": 1, }, "start": Object { - "column": 3, + "column": 17, "line": 1, }, }, "range": Array [ - 3, - 4, + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 19, "line": 1, }, "start": Object { - "column": 5, + "column": 18, "line": 1, }, }, "range": Array [ - 5, - 8, + 18, + 19, ], "type": "Punctuator", - "value": "...", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forIn/for-in-with-const.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 22, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 32, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 33, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 12, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 16, + 20, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 0, + 3, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -62786,16 +93540,16 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, + 5, 10, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { @@ -62812,13 +93566,13 @@ Object { 11, 12, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -62828,238 +93582,305 @@ Object { }, "range": Array [ 13, - 14, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 15, + 16, + 20, ], "type": "Identifier", - "value": "a", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 20, "line": 1, }, }, "range": Array [ - 15, - 16, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 17, + "column": 22, "line": 1, }, }, "range": Array [ - 17, - 20, + 22, + 29, + ], + "type": "Identifier", + "value": "process", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 31, "line": 1, }, "start": Object { - "column": 20, + "column": 30, "line": 1, }, }, "range": Array [ - 20, - 21, + 30, + 31, ], "type": "Identifier", - "value": "b", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 32, "line": 1, }, "start": Object { - "column": 21, + "column": 31, "line": 1, }, }, "range": Array [ - 21, - 22, + 31, + 32, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 33, "line": 1, }, "start": Object { - "column": 22, + "column": 32, "line": 1, }, }, "range": Array [ - 22, - 23, + 32, + 33, ], "type": "Punctuator", - "value": ")", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-milti-asigment.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 12, + "column": 25, "line": 1, }, "start": Object { - "column": 9, + "column": 24, "line": 1, }, }, - "name": "foo", "range": Array [ - 9, - 12, + 24, + 25, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "EmptyStatement", }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, - }, - "properties": Array [ - Object { - "argument": Object { + "init": Object { + "left": Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, - "name": "bar", + "name": "y", "range": Array [ - 17, - 20, + 13, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, + "operator": "=", "range": Array [ - 14, - 20, + 13, + 18, ], - "type": "RestElement", + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", }, - ], - "range": Array [ - 13, - 21, - ], - "type": "ObjectPattern", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, - ], + "range": Array [ + 5, + 18, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 26, + 25, ], - "type": "FunctionDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "q", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], @@ -63075,14 +93896,14 @@ Object { }, "range": Array [ 0, - 27, + 26, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -63092,15 +93913,51 @@ Object { }, "range": Array [ 0, + 3, + ], + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, 8, ], "type": "Keyword", - "value": "function", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -63110,28 +93967,28 @@ Object { }, "range": Array [ 9, - 12, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 13, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { @@ -63148,31 +94005,31 @@ Object { 13, 14, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 17, + 15, + 16, ], "type": "Punctuator", - "value": "...", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { @@ -63182,10 +94039,10 @@ Object { }, "range": Array [ 17, - 20, + 18, ], "type": "Identifier", - "value": "bar", + "value": "z", }, Object { "loc": Object { @@ -63194,34 +94051,34 @@ Object { "line": 1, }, "start": Object { - "column": 20, + "column": 19, "line": 1, }, }, "range": Array [ - 20, + 19, 21, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { - "column": 21, + "column": 22, "line": 1, }, }, "range": Array [ - 21, 22, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "q", }, Object { "loc": Object { @@ -63239,247 +94096,168 @@ Object { 24, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 25, "line": 1, }, "start": Object { - "column": 25, + "column": 24, "line": 1, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; - -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-rest.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "method": false, + "range": Array [ + 7, + 12, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 10, + "line": 1, }, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", + "name": "xx", + "range": Array [ + 10, + 12, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 17, + "line": 1, }, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", }, - ], - "range": Array [ - 4, - 19, - ], - "type": "ObjectPattern", - }, - "init": Object { + "name": "rrestOff", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 25, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 5, + 27, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { "column": 0, @@ -63488,16 +94266,34 @@ Object { }, "range": Array [ 0, - 26, + 41, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "array", + "range": Array [ + 31, + 36, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 3, }, "start": Object { "column": 0, @@ -63506,7 +94302,7 @@ Object { }, "range": Array [ 0, - 27, + 42, ], "sourceType": "module", "tokens": Array [ @@ -63526,7 +94322,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -63544,25 +94340,25 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -63579,31 +94375,31 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 10, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { @@ -63613,15 +94409,15 @@ Object { }, "range": Array [ 10, - 11, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "xx", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { @@ -63631,61 +94427,61 @@ Object { }, "range": Array [ 12, - 15, + 13, ], "type": "Punctuator", - "value": "...", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 16, + 14, + 17, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 25, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 25, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "rrestOff", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 27, "line": 1, }, "start": Object { - "column": 18, + "column": 26, "line": 1, }, }, "range": Array [ - 18, - 19, + 26, + 27, ], "type": "Punctuator", "value": "}", @@ -63693,508 +94489,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 20, + "column": 28, "line": 1, }, }, "range": Array [ - 20, - 21, + 28, + 30, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 36, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 25, + 31, + 36, ], "type": "Identifier", - "value": "foo", + "value": "array", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 37, "line": 1, }, "start": Object { - "column": 25, + "column": 36, "line": 1, }, }, "range": Array [ - 25, - 26, + 36, + 37, ], "type": "Punctuator", - "value": ";", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } -`; - -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 4, - 18, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 23, - 27, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 29, - 33, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, +`; + +exports[`javascript fixtures/forIn/for-in-with-var.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "method": false, - "range": Array [ - 35, - 39, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "3", - "type": "Literal", - "value": 3, + "start": Object { + "column": 28, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 41, - 45, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, + "name": "x", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, - ], + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "process", "range": Array [ - 21, - 47, + 20, + 27, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 47, + "column": 30, "line": 1, }, "start": Object { - "column": 4, + "column": 20, "line": 1, }, }, "range": Array [ - 4, - 47, + 20, + 30, ], - "type": "VariableDeclarator", + "type": "CallExpression", }, - ], - "kind": "var", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 31, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 10, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 48, + "column": 31, "line": 1, }, "start": Object { @@ -64204,9 +94725,27 @@ Object { }, "range": Array [ 0, - 48, + 31, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 14, + 18, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "comments": Array [], @@ -64222,7 +94761,7 @@ Object { }, "range": Array [ 0, - 49, + 32, ], "sourceType": "module", "tokens": Array [ @@ -64242,7 +94781,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -64260,25 +94799,7 @@ Object { 5, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", + "value": "(", }, Object { "loc": Object { @@ -64287,16 +94808,16 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, + 5, 8, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { @@ -64314,130 +94835,112 @@ Object { 10, ], "type": "Identifier", - "value": "y", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, 11, + 13, ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 16, + 14, + 18, ], "type": "Identifier", - "value": "z", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 27, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, 20, + 27, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 28, "line": 1, }, "start": Object { - "column": 21, + "column": 27, "line": 1, }, }, "range": Array [ - 21, - 22, + 27, + 28, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 29, "line": 1, }, "start": Object { - "column": 23, + "column": 28, "line": 1, }, }, "range": Array [ - 23, - 24, + 28, + 29, ], "type": "Identifier", "value": "x", @@ -64445,287 +94948,422 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 24, + "column": 29, "line": 1, }, }, "range": Array [ - 24, - 25, + 29, + 30, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { - "column": 26, + "column": 30, "line": 1, }, }, "range": Array [ - 26, - 27, + 30, + 31, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-array.src 1`] = ` +Object { + "body": Array [ Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "doSomething", + "range": Array [ + 22, + 33, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 35, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 36, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 10, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 27, + "column": 0, "line": 1, }, }, "range": Array [ - 27, - 28, + 0, + 36, ], - "type": "Punctuator", - "value": ",", + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "ArrayExpression", + }, + "type": "ForOfStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 30, + "column": 3, "line": 1, }, "start": Object { - "column": 29, + "column": 0, "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 3, ], - "type": "Identifier", - "value": "y", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 5, "line": 1, }, "start": Object { - "column": 30, + "column": 4, "line": 1, }, }, "range": Array [ - 30, - 31, + 4, + 5, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 8, "line": 1, }, "start": Object { - "column": 32, + "column": 5, "line": 1, }, }, "range": Array [ - 32, - 33, + 5, + 8, ], - "type": "Numeric", - "value": "2", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 10, "line": 1, }, "start": Object { - "column": 33, + "column": 9, "line": 1, }, }, "range": Array [ - 33, - 34, + 9, + 10, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 13, "line": 1, }, "start": Object { - "column": 35, + "column": 11, "line": 1, }, }, "range": Array [ - 35, - 36, + 11, + 13, ], "type": "Identifier", - "value": "a", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 15, "line": 1, }, "start": Object { - "column": 36, + "column": 14, "line": 1, }, }, "range": Array [ - 36, - 37, + 14, + 15, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 16, "line": 1, }, "start": Object { - "column": 38, + "column": 15, "line": 1, }, }, "range": Array [ - 38, - 39, + 15, + 16, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 17, "line": 1, }, "start": Object { - "column": 39, + "column": 16, "line": 1, }, }, "range": Array [ - 39, - 40, + 16, + 17, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 41, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 41, - 42, + 22, + 33, ], "type": "Identifier", - "value": "b", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 42, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 42, - 43, + 33, + 34, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Numeric", - "value": "4", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 46, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 46, - 47, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 47, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 47, - 48, + 35, + 36, ], "type": "Punctuator", "value": ";", @@ -64735,402 +95373,162 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-destruction.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "start": Object { + "column": 31, + "line": 1, }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "range": Array [ - 56, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "computed": false, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { "column": 14, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "name": "foo", - "range": Array [ - 77, - 80, - ], - "type": "Identifier", + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "name", "range": Array [ - 73, - 80, + 10, + 14, ], - "type": "MemberExpression", + "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "range": Array [ - 70, - 80, - ], - "type": "SpreadElement", }, - ], + "range": Array [ + 9, + 22, + ], + "type": "ArrayPattern", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, "range": Array [ - 36, - 82, + 9, + 22, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 32, - 82, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 33, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 83, + 0, + 33, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 2, }, "start": Object { "column": 0, @@ -65139,7 +95537,7 @@ Object { }, "range": Array [ 0, - 84, + 34, ], "sourceType": "module", "tokens": Array [ @@ -65159,12 +95557,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -65174,10 +95572,10 @@ Object { }, "range": Array [ 4, - 7, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -65186,49 +95584,67 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, + 5, 8, ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 13, - 16, + 10, + 14, ], "type": "Identifier", - "value": "get", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 16, - 17, + 14, + 15, ], "type": "Punctuator", "value": ",", @@ -65236,643 +95652,737 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, }, "range": Array [ + 21, 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, 25, ], "type": "Identifier", - "value": "set", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 25, 26, + 29, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 28, - 31, + 29, + 30, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 32, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 31, + "line": 1, }, }, "range": Array [ + 31, 32, - 33, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 32, + "line": 1, }, }, "range": Array [ - 34, - 35, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-destruction-object.src 1`] = ` +Object { + "body": Array [ Object { + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 9, + 22, + ], + "type": "ObjectPattern", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "name": "obj", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", + "type": "ForOfStatement", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 45, + 0, + 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 45, - 46, + 4, + 5, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 9, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 47, - 50, + 5, + 8, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 9, + "line": 1, }, }, "range": Array [ - 50, - 51, + 9, + 10, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 10, + "line": 1, }, }, "range": Array [ - 56, - 59, + 10, + 14, ], "type": "Identifier", - "value": "get", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 59, - 60, + 14, + 15, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 21, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 16, + "line": 1, }, }, "range": Array [ - 61, - 64, + 16, + 21, ], "type": "Identifier", - "value": "get", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 22, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 21, + "line": 1, }, }, "range": Array [ - 64, - 65, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 23, + "line": 1, }, }, "range": Array [ - 70, - 73, + 23, + 25, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 29, + "line": 1, }, "start": Object { - "column": 7, - "line": 8, + "column": 26, + "line": 1, }, }, "range": Array [ - 73, - 76, + 26, + 29, ], "type": "Identifier", - "value": "set", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 8, + "column": 30, + "line": 1, }, "start": Object { - "column": 10, - "line": 8, + "column": 29, + "line": 1, }, }, "range": Array [ - 76, - 77, + 29, + 30, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "value": "foo", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 32, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 31, + "line": 1, }, }, "range": Array [ - 81, - 82, + 31, + 32, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 33, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 32, + "line": 1, }, }, "range": Array [ - 82, - 83, + 32, + 33, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-object.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "initialize", - "range": Array [ - 7, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 15, + "line": 2, }, "start": Object { "column": 4, "line": 2, }, }, - "method": true, + "name": "doSomething", "range": Array [ - 7, - 104, + 22, + 33, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 51, - 104, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 19, - 26, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 28, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "name": "options", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 38, - 48, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 18, - 49, - ], - "type": "ObjectPattern", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 35, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 36, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - ], + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", "range": Array [ - 17, - 104, + 9, + 10, ], - "type": "FunctionExpression", + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, + "range": Array [ + 9, + 10, + ], + "type": "VariableDeclarator", }, ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, "range": Array [ - 1, - 106, + 5, + 10, ], - "type": "ObjectExpression", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -65881,35 +96391,34 @@ Object { }, "range": Array [ 0, - 108, + 36, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", }, - "range": Array [ - 61, - 98, - ], - "type": "Line", - "value": " ... do some stuff with options ...", + "type": "ForOfStatement", }, ], + "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -65918,14 +96427,14 @@ Object { }, "range": Array [ 0, - 109, + 37, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -65935,61 +96444,25 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, + "column": 5, "line": 1, }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, "start": Object { "column": 4, - "line": 2, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "Identifier", - "value": "initialize", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, + "line": 1, }, }, "range": Array [ - 17, - 18, + 4, + 5, ], "type": "Punctuator", "value": "(", @@ -65997,161 +96470,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 18, - 19, + 5, + 8, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 19, - 26, + 9, + 10, ], "type": "Identifier", - "value": "someVar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 26, - 27, + 11, + 13, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 28, - 36, + 14, + 15, ], - "type": "Identifier", - "value": "otherVar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 36, - 37, + 15, + 16, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 38, - 41, + 16, + 17, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 15, "line": 2, }, "start": Object { - "column": 38, + "column": 4, "line": 2, }, }, "range": Array [ - 41, - 48, + 22, + 33, ], "type": "Identifier", - "value": "options", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 16, "line": 2, }, "start": Object { - "column": 45, + "column": 15, "line": 2, }, }, "range": Array [ - 48, - 49, + 33, + 34, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 17, "line": 2, }, "start": Object { - "column": 46, + "column": 16, "line": 2, }, }, "range": Array [ - 49, - 50, + 34, + 35, ], "type": "Punctuator", "value": ")", @@ -66159,89 +96632,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 49, + "column": 18, "line": 2, }, "start": Object { - "column": 48, + "column": 17, "line": 2, }, }, "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, + 35, + 36, ], "type": "Punctuator", "value": ";", @@ -66251,319 +96652,255 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 61, + 62, + ], + "type": "Identifier", + }, + ], + "callee": Object { "loc": Object { "end": Object { - "column": 5, + "column": 60, "line": 1, }, "start": Object { - "column": 4, + "column": 53, "line": 1, }, }, - "name": "x", + "name": "process", "range": Array [ - 4, - 5, + 53, + 60, ], "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 63, + "line": 1, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "initialize", - "range": Array [ - 14, - 24, - ], - "type": "Identifier", + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 63, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 64, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 9, + "line": 1, }, - "method": true, - "range": Array [ - 14, - 111, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, + }, + "name": "i", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "raw": "10", + "type": "Literal", + "value": 10, }, - }, - "range": Array [ - 58, - 111, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 33, + "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 26, - 33, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 35, - 43, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "name": "options", - "range": Array [ - 48, - 55, - ], - "type": "Identifier", + "operator": "in", + "range": Array [ + 33, + 41, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 41, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, + "start": Object { + "column": 39, + "line": 1, }, - "range": Array [ - 45, - 55, - ], - "type": "RestElement", }, - ], - "range": Array [ - 25, - 56, - ], - "type": "ObjectPattern", + "range": Array [ + 39, + 41, + ], + "type": "ArrayExpression", + }, + "type": "BinaryExpression", }, - ], - "range": Array [ - 24, - 111, - ], - "type": "FunctionExpression", + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 41, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 43, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, }, }, - ], + "params": Array [], + "range": Array [ + 13, + 43, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, "range": Array [ - 8, - 113, + 9, + 43, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 4, - 113, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 43, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 64, + "line": 1, }, "start": Object { "column": 0, @@ -66572,35 +96909,34 @@ Object { }, "range": Array [ 0, - 114, + 64, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, + "right": Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, }, + "name": "list", + "range": Array [ + 47, + 51, + ], + "type": "Identifier", }, - "range": Array [ - 68, - 105, - ], - "type": "Line", - "value": " ... do some stuff with options ...", + "type": "ForOfStatement", }, ], + "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -66609,7 +96945,7 @@ Object { }, "range": Array [ 0, - 114, + 65, ], "sourceType": "module", "tokens": Array [ @@ -66629,7 +96965,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -66646,23 +96982,59 @@ Object { 4, 5, ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], "type": "Identifier", - "value": "x", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, "range": Array [ - 6, - 7, + 11, + 12, ], "type": "Punctuator", "value": "=", @@ -66670,48 +97042,66 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 21, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 14, - 24, + 22, + 23, ], - "type": "Identifier", - "value": "initialize", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ @@ -66719,238 +97109,256 @@ Object { 25, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 25, 26, + 32, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 36, + "line": 1, }, }, "range": Array [ - 26, - 33, + 36, + 38, ], - "type": "Identifier", - "value": "someVar", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 40, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 39, + "line": 1, }, }, "range": Array [ - 33, - 34, + 39, + 40, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 40, + "line": 1, }, }, "range": Array [ - 35, - 43, + 40, + 41, ], - "type": "Identifier", - "value": "otherVar", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ + 42, 43, - 44, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 44, + "line": 1, }, }, "range": Array [ - 45, - 48, + 44, + 46, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 51, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 47, + "line": 1, }, }, "range": Array [ - 48, - 55, + 47, + 51, ], "type": "Identifier", - "value": "options", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 52, + "line": 1, }, "start": Object { - "column": 45, - "line": 2, + "column": 51, + "line": 1, }, }, "range": Array [ - 55, - 56, + 51, + 52, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 2, + "column": 60, + "line": 1, }, "start": Object { - "column": 46, - "line": 2, + "column": 53, + "line": 1, }, }, "range": Array [ - 56, - 57, + 53, + 60, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 2, + "column": 61, + "line": 1, }, "start": Object { - "column": 48, - "line": 2, + "column": 60, + "line": 1, }, }, "range": Array [ - 58, - 59, + 60, + 61, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 62, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 61, + "line": 1, }, }, "range": Array [ - 110, - 111, + 61, + 62, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 63, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 62, + "line": 1, }, }, "range": Array [ - 112, - 113, + 62, + 63, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 64, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 63, + "line": 1, }, }, "range": Array [ - 113, - 114, + 63, + 64, ], "type": "Punctuator", "value": ";", @@ -66960,366 +97368,180 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-rest.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 38, + "line": 1, }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", + "range": Array [ + 38, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 45, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "method": false, - "range": Array [ - 51, - 54, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 1, }, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 63, - 66, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "SpreadElement", + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, }, - ], + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, "range": Array [ - 36, - 68, + 7, + 12, ], - "type": "ObjectExpression", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "xx", + "range": Array [ + 10, + 12, + ], + "type": "Identifier", + }, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "rrestOff", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 5, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "range": Array [ + 14, + 25, + ], + "type": "RestElement", }, - "range": Array [ - 32, - 68, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 5, + 27, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 69, + 0, + 41, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "array", + "range": Array [ + 31, + 36, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 3, }, "start": Object { "column": 0, @@ -67328,7 +97550,7 @@ Object { }, "range": Array [ 0, - 70, + 42, ], "sourceType": "module", "tokens": Array [ @@ -67348,12 +97570,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -67363,10 +97585,28 @@ Object { }, "range": Array [ 4, - 7, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -67383,95 +97623,447 @@ Object { 7, 8, ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "Identifier", + "value": "xx", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, }, }, "range": Array [ + 12, 13, - 16, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 25, ], "type": "Identifier", - "value": "get", + "value": "rrestOff", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "Identifier", + "value": "of", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 36, + ], + "type": "Identifier", + "value": "array", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, "line": 2, }, "start": Object { - "column": 7, + "column": 0, "line": 2, }, }, "range": Array [ - 16, - 17, + 40, + 41, ], "type": "Punctuator", - "value": ",", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` +Object { + "body": Array [ + Object { + "await": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "doSomething", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 39, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 10, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 22, - 25, + 0, + 3, ], - "type": "Identifier", - "value": "set", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 4, + "line": 1, }, }, "range": Array [ - 25, - 26, + 4, + 5, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 8, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 5, + "line": 1, }, }, "range": Array [ - 28, - 31, + 5, + 8, ], "type": "Keyword", "value": "var", @@ -67479,17 +98071,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 9, + "line": 1, }, }, "range": Array [ - 32, - 33, + 9, + 10, ], "type": "Identifier", "value": "x", @@ -67497,234 +98089,182 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 11, + "line": 1, }, }, "range": Array [ - 34, - 35, + 11, + 13, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 36, - 37, + 14, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 17, + "line": 1, }, }, "range": Array [ - 42, - 45, + 17, + 18, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 20, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 19, + "line": 1, }, }, "range": Array [ - 45, - 46, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 15, + "line": 2, }, "start": Object { "column": 4, - "line": 7, + "line": 2, }, }, "range": Array [ - 51, - 54, + 25, + 36, ], "type": "Identifier", - "value": "get", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 16, + "line": 2, }, "start": Object { - "column": 7, - "line": 7, + "column": 15, + "line": 2, }, }, "range": Array [ - 54, - 55, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 17, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 16, + "line": 2, }, }, "range": Array [ - 60, - 63, + 37, + 38, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 18, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 17, + "line": 2, }, }, "range": Array [ - 63, - 66, + 38, + 39, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 3, }, "start": Object { "column": 0, - "line": 9, + "line": 3, }, }, "range": Array [ - 67, - 68, + 40, + 41, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 2, }, "start": Object { @@ -67732,17 +98272,16 @@ Object { "line": 2, }, }, - "name": "get", + "name": "doSomething", "range": Array [ - 13, - 16, + 23, + 34, ], "type": "Identifier", }, - "init": null, "loc": Object { "end": Object { - "column": 7, + "column": 17, "line": 2, }, "start": Object { @@ -67751,294 +98290,123 @@ Object { }, }, "range": Array [ - 13, - 16, + 23, + 36, ], - "type": "VariableDeclarator", + "type": "CallExpression", }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 18, + "line": 2, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "start": Object { + "column": 4, + "line": 2, }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, }, + "range": Array [ + 23, + 37, + ], + "type": "ExpressionStatement", }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "range": Array [ - 56, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "range": Array [ - 70, - 76, - ], - "type": "SpreadElement", }, - ], + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, "range": Array [ - 36, - 78, + 9, + 10, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 32, - 78, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 10, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 18, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 79, + 0, + 37, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 3, }, "start": Object { "column": 0, @@ -68047,7 +98415,7 @@ Object { }, "range": Array [ 0, - 80, + 38, ], "sourceType": "module", "tokens": Array [ @@ -68067,12 +98435,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -68082,10 +98450,10 @@ Object { }, "range": Array [ 4, - 7, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -68094,152 +98462,152 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, + 5, 8, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 13, - 16, + 9, + 10, ], "type": "Identifier", - "value": "get", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 16, - 17, + 11, + 13, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 22, - 25, + 14, + 17, ], "type": "Identifier", - "value": "set", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 15, + "line": 2, }, "start": Object { - "column": 0, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 28, - 31, + 23, + 34, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 16, + "line": 2, }, "start": Object { - "column": 4, - "line": 5, + "column": 15, + "line": 2, }, }, "range": Array [ - 32, - 33, + 34, + 35, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 17, + "line": 2, }, "start": Object { - "column": 6, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 34, 35, + 36, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 18, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 17, + "line": 2, }, }, "range": Array [ @@ -68247,220 +98615,373 @@ Object { 37, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +Object { + "body": Array [ Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "doSomething", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 39, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 12, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 18, + "line": 2, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 45, + 0, + 39, ], - "type": "Identifier", - "value": "foo", + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 45, - 46, + 0, + 3, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 9, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 47, - 50, + 4, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 50, - 51, + 5, + 10, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 56, - 59, + 11, + 12, ], "type": "Identifier", - "value": "get", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 13, + "line": 1, }, }, "range": Array [ - 59, - 60, + 13, + 15, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 19, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 16, + "line": 1, }, }, "range": Array [ - 61, - 64, + 16, + 19, ], "type": "Identifier", - "value": "get", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 20, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 19, + "line": 1, }, }, "range": Array [ - 64, - 65, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 15, + "line": 2, }, "start": Object { "column": 4, - "line": 8, + "line": 2, }, }, "range": Array [ - 70, - 73, + 25, + 36, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 16, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 15, + "line": 2, }, }, "range": Array [ - 73, - 76, + 36, + 37, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 9, + "column": 16, + "line": 2, }, }, "range": Array [ - 77, - 78, + 37, + 38, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 18, + "line": 2, }, "start": Object { - "column": 1, - "line": 9, + "column": 17, + "line": 2, }, }, "range": Array [ - 78, - 79, + 38, + 39, ], "type": "Punctuator", "value": ";", @@ -68470,158 +98991,89 @@ Object { } `; -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` +exports[`javascript fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "doSomething", "range": Array [ - 3, - 4, + 23, + 34, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", + "start": Object { + "column": 4, + "line": 2, }, }, + "range": Array [ + 23, + 36, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 37, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, - "name": "c", + "name": "x", "range": Array [ - 12, - 13, + 9, + 10, ], "type": "Identifier", }, + "init": null, "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { @@ -68631,21 +99083,32 @@ Object { }, "range": Array [ 9, - 13, + 10, ], - "type": "SpreadElement", + "type": "VariableDeclarator", }, ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, "range": Array [ - 1, - 16, + 5, + 10, ], - "type": "ObjectExpression", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -68654,16 +99117,34 @@ Object { }, "range": Array [ 0, - 17, + 37, ], - "type": "ExpressionStatement", + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 3, }, "start": Object { "column": 0, @@ -68672,14 +99153,14 @@ Object { }, "range": Array [ 0, - 18, + 38, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -68689,46 +99170,10 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ 3, - 4, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { @@ -68746,25 +99191,7 @@ Object { 5, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", + "value": "(", }, Object { "loc": Object { @@ -68773,21 +99200,21 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, + 5, 8, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -68797,10 +99224,10 @@ Object { }, "range": Array [ 9, - 12, + 10, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -68809,414 +99236,250 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ - 12, + 11, 13, ], "type": "Identifier", - "value": "c", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 17, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 16, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 16, - 17, + 23, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "doSomething", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, }, + }, + "range": Array [ + 34, + 35, ], - "kind": "var", + "type": "Punctuator", + "value": "(", + }, + Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 0, - 26, + 35, + 36, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": ")", }, Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, - }, - Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/generators/anonymous-generator.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { "argument": Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 22, + "line": 1, }, }, - "name": "get", + "name": "v", "range": Array [ - 59, - 62, + 22, + 23, ], "type": "Identifier", }, + "delegate": false, "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 16, + "line": 1, }, }, "range": Array [ - 56, - 62, + 16, + 23, ], - "type": "SpreadElement", + "type": "YieldExpression", }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 71, - 74, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "start": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 68, - 74, - ], - "type": "SpreadElement", }, - ], - "range": Array [ - 36, - 76, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 16, + 23, + ], + "type": "ExpressionStatement", + }, + ], "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 32, - 76, + 14, + 25, ], - "type": "VariableDeclarator", + "type": "BlockStatement", }, - ], - "kind": "var", + "expression": false, + "generator": true, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 1, + 25, + ], + "type": "FunctionExpression", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 27, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 77, + 0, + 27, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 10, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -69225,14 +99488,14 @@ Object { }, "range": Array [ 0, - 78, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -69242,457 +99505,656 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 7, + 1, + 9, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 8, + 9, + 10, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 16, - 17, + 11, + 12, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 22, - 25, + 12, + 13, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 28, - 31, + 16, + 21, ], "type": "Keyword", - "value": "var", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 22, + "line": 1, }, }, "range": Array [ - 32, - 33, + 22, + 23, ], "type": "Identifier", - "value": "x", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 25, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 24, + "line": 1, }, }, "range": Array [ - 34, - 35, + 24, + 25, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 25, + "line": 1, }, }, "range": Array [ - 36, - 37, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 26, + "line": 1, }, }, "range": Array [ - 42, - 45, + 26, + 27, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/generators/async-generator-function.src 1`] = ` +Object { + "body": Array [ Object { + "async": true, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 23, + 27, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 1, + "line": 4, }, "start": Object { - "column": 7, - "line": 6, + "column": 0, + "line": 2, }, }, + "params": Array [], "range": Array [ - 45, - 46, + 1, + 27, ], - "type": "Punctuator", - "value": ":", + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 1, + 28, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 5, + "line": 2, }, "start": Object { - "column": 9, - "line": 6, + "column": 0, + "line": 2, }, }, "range": Array [ - 47, - 50, + 1, + 6, ], "type": "Identifier", - "value": "foo", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 14, + "line": 2, }, "start": Object { - "column": 12, - "line": 6, + "column": 6, + "line": 2, }, }, "range": Array [ - 50, - 51, + 7, + 15, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 16, + "line": 2, }, "start": Object { - "column": 4, - "line": 7, + "column": 15, + "line": 2, }, }, "range": Array [ - 56, - 59, + 16, + 17, ], "type": "Punctuator", - "value": "...", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 19, + "line": 2, }, "start": Object { - "column": 7, - "line": 7, + "column": 16, + "line": 2, }, }, "range": Array [ - 59, - 62, + 17, + 20, ], "type": "Identifier", - "value": "get", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 20, + "line": 2, }, "start": Object { - "column": 10, - "line": 7, + "column": 19, + "line": 2, }, }, "range": Array [ - 62, - 63, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 21, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 20, + "line": 2, }, }, "range": Array [ - 68, - 71, + 21, + 22, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 23, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 22, + "line": 2, }, }, "range": Array [ - 71, - 74, + 23, + 24, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 4, }, "start": Object { "column": 0, - "line": 9, + "line": 4, }, }, "range": Array [ - 75, - 76, + 26, + 27, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ";", - }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-method.src 1`] = ` Object { "body": Array [ Object { - "block": Object { - "body": Array [], + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "f", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 63, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": true, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + "init": Object { + "argument": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "name": "g", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 53, + 56, + ], + "type": "CallExpression", + }, + "delegate": true, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 46, + 56, + ], + "type": "YieldExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 42, + 56, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 36, + 57, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 63, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 23, + 63, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, - 6, + 8, + 65, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "BlockStatement", - }, + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, - "param": null, + "name": "C", "range": Array [ + 6, 7, - 15, ], - "type": "CatchClause", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -69701,16 +100163,17 @@ Object { }, "range": Array [ 0, - 15, + 65, ], - "type": "TryStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 6, }, "start": Object { "column": 0, @@ -69719,14 +100182,14 @@ Object { }, "range": Array [ 0, - 16, + 66, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -69736,79 +100199,151 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "try", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 5, + 6, + 7, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, "range": Array [ - 5, - 6, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 19, + ], + "type": "Identifier", + "value": "async", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { "column": 12, - "line": 1, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 7, - 12, + 23, + 24, ], - "type": "Keyword", - "value": "catch", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { "column": 14, - "line": 1, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 13, - 14, + 26, + 27, ], "type": "Punctuator", "value": "{", @@ -69816,294 +100351,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 14, - 15, + 36, + 41, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "const", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` -Object { - "body": Array [ Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "BlockStatement", - }, - "finalizer": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "param": null, - "range": Array [ - 7, - 15, - ], - "type": "CatchClause", - }, "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 0, - 26, + 42, + 43, ], - "type": "TryStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "x", }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 0, - 3, + 44, + 45, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 23, + "line": 3, }, "start": Object { - "column": 4, - "line": 1, + "column": 18, + "line": 3, }, }, "range": Array [ - 4, - 5, + 46, + 51, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 24, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 23, + "line": 3, }, }, "range": Array [ - 5, - 6, + 51, + 52, ], "type": "Punctuator", - "value": "}", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 26, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 25, + "line": 3, }, }, "range": Array [ - 7, - 12, + 53, + 54, ], - "type": "Keyword", - "value": "catch", + "type": "Identifier", + "value": "g", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 27, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 26, + "line": 3, }, }, "range": Array [ - 13, - 14, + 54, + 55, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 27, + "line": 3, }, }, "range": Array [ - 14, - 15, + 55, + 56, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 29, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 28, + "line": 3, }, }, "range": Array [ - 16, - 23, + 56, + 57, ], - "type": "Keyword", - "value": "finally", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 24, - 25, + 62, + 63, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 25, - 26, + 64, + 65, ], "type": "Punctuator", "value": "}", @@ -70113,189 +100551,136 @@ Object { } `; -exports[`ecmaFeatures fixtures/exponentiationOperators/exponential-operators.src 1`] = ` +exports[`javascript fixtures/generators/double-yield.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "delegate": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 30, + ], + "type": "YieldExpression", }, - "start": Object { - "column": 8, - "line": 1, + "delegate": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "range": Array [ + 16, + 30, + ], + "type": "YieldExpression", }, - "range": Array [ - 8, - 9, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "**", - "range": Array [ - 8, - 14, - ], - "right": Object { "loc": Object { "end": Object { - "column": 14, + "column": 30, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 30, ], - "raw": "3", - "type": "Literal", - "value": 3, + "type": "ExpressionStatement", }, - "type": "BinaryExpression", - }, + ], "loc": Object { "end": Object { - "column": 14, + "column": 32, "line": 1, }, "start": Object { - "column": 4, + "column": 14, "line": 1, }, }, "range": Array [ - 4, 14, + 32, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", + "type": "BlockStatement", }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 1, + "line": 1, }, }, - "operator": "**=", + "params": Array [], "range": Array [ - 16, - 23, + 1, + 32, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentExpression", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 16, - 24, + 0, + 34, ], "type": "ExpressionStatement", }, @@ -70303,214 +100688,232 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 3, + "column": 34, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ + }, + "range": Array [ + 0, + 34, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 1, "line": 1, }, }, "range": Array [ - 0, - 3, + 1, + 9, ], "type": "Keyword", - "value": "var", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 10, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, "range": Array [ - 6, - 7, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 12, "line": 1, }, }, "range": Array [ - 8, - 9, + 12, + 13, ], - "type": "Numeric", - "value": "2", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, - 12, + 14, + 15, ], "type": "Punctuator", - "value": "**", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 21, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 21, ], - "type": "Numeric", - "value": "3", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 14, + "column": 22, "line": 1, }, }, "range": Array [ - 14, - 15, + 22, + 27, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 16, - 17, + 28, + 30, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 18, - 21, + 31, + 32, ], "type": "Punctuator", - "value": "**=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 22, - 23, + 32, + 33, ], - "type": "Numeric", - "value": "4", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 23, - 24, + 33, + 34, ], "type": "Punctuator", "value": ";", @@ -70520,254 +100923,52 @@ Object { } `; -exports[`ecmaFeatures fixtures/forOf/for-of-with-function-initializer.src 1`] = ` +exports[`javascript fixtures/generators/empty-generator-declaration.src 1`] = ` Object { "body": Array [ Object { - "await": false, + "async": false, "body": Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "name": "process", - "range": Array [ - 53, - 60, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 63, - ], - "type": "CallExpression", - }, + "body": Array [], "loc": Object { "end": Object { - "column": 64, + "column": 16, "line": 1, }, "start": Object { - "column": 53, + "column": 14, "line": 1, }, }, "range": Array [ - 53, - 64, + 14, + 16, ], - "type": "ExpressionStatement", + "type": "BlockStatement", }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "i", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "operator": "in", - "range": Array [ - 33, - 41, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 41, - ], - "type": "ArrayExpression", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 41, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 43, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 43, - ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + "expression": false, + "generator": true, + "id": Object { "loc": Object { "end": Object { - "column": 43, + "column": 11, "line": 1, }, "start": Object { - "column": 5, + "column": 10, "line": 1, }, }, + "name": "t", "range": Array [ - 5, - 43, + 10, + 11, ], - "type": "VariableDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 64, + "column": 16, "line": 1, }, "start": Object { @@ -70775,36 +100976,36 @@ Object { "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 64, + 16, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, - "name": "list", - "range": Array [ - 47, - 51, - ], - "type": "Identifier", }, - "type": "ForOfStatement", + "range": Array [ + 16, + 17, + ], + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -70813,14 +101014,14 @@ Object { }, "range": Array [ 0, - 65, + 17, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -70830,64 +101031,46 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "for", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { "column": 8, "line": 1, }, - "start": Object { - "column": 5, - "line": 1, - }, }, "range": Array [ - 5, 8, + 9, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], "type": "Identifier", - "value": "i", + "value": "t", }, Object { "loc": Object { @@ -70905,328 +101088,428 @@ Object { 12, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { "column": 13, "line": 1, }, - }, - "range": Array [ - 13, - 21, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ - 21, - 22, + 12, + 13, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, "range": Array [ - 22, - 23, + 14, + 15, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, "range": Array [ - 24, - 25, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 17, "line": 1, }, "start": Object { - "column": 26, + "column": 16, "line": 1, }, }, "range": Array [ - 26, - 32, + 16, + 17, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "delegate": true, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "YieldExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 30, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 35, + "column": 30, "line": 1, }, "start": Object { - "column": 33, + "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ - 33, - 35, + 0, + 30, ], - "type": "Numeric", - "value": "10", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 31, "line": 1, }, "start": Object { - "column": 36, + "column": 30, "line": 1, }, }, "range": Array [ - 36, - 38, + 30, + 31, ], - "type": "Keyword", - "value": "in", + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 40, + "column": 8, "line": 1, }, "start": Object { - "column": 39, + "column": 0, "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 8, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 9, "line": 1, }, "start": Object { - "column": 40, + "column": 8, "line": 1, }, }, "range": Array [ - 40, - 41, + 8, + 9, ], "type": "Punctuator", - "value": "]", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 14, "line": 1, }, "start": Object { - "column": 42, + "column": 10, "line": 1, }, }, "range": Array [ - 42, - 43, + 10, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 16, "line": 1, }, "start": Object { - "column": 44, + "column": 15, "line": 1, }, }, "range": Array [ - 44, - 46, + 15, + 16, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 17, "line": 1, }, "start": Object { - "column": 47, + "column": 16, "line": 1, }, }, "range": Array [ - 47, - 51, + 16, + 17, ], - "type": "Identifier", - "value": "list", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 19, "line": 1, }, "start": Object { - "column": 51, + "column": 18, "line": 1, }, }, "range": Array [ - 51, - 52, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 60, + "column": 25, "line": 1, }, "start": Object { - "column": 53, + "column": 20, "line": 1, }, }, "range": Array [ - 53, - 60, + 20, + 25, ], - "type": "Identifier", - "value": "process", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 61, + "column": 27, "line": 1, }, "start": Object { - "column": 60, + "column": 26, "line": 1, }, }, "range": Array [ - 60, - 61, + 26, + 27, ], "type": "Punctuator", - "value": "(", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 62, + "column": 28, "line": 1, }, "start": Object { - "column": 61, + "column": 27, "line": 1, }, }, "range": Array [ - 61, - 62, + 27, + 28, ], "type": "Identifier", - "value": "x", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 63, + "column": 30, "line": 1, }, "start": Object { - "column": 62, + "column": 29, "line": 1, }, }, "range": Array [ - 62, - 63, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 64, + "column": 31, "line": 1, }, "start": Object { - "column": 63, + "column": 30, "line": 1, }, }, "range": Array [ - 63, - 64, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -71236,143 +101519,108 @@ Object { } `; -exports[`ecmaFeatures fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-delegation.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "delegate": true, "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 16, + "line": 1, }, }, - "name": "doSomething", "range": Array [ - 25, - 36, + 16, + 24, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "YieldExpression", }, - }, - "range": Array [ - 25, - 39, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 41, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 24, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 24, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 14, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 26, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -71381,34 +101629,16 @@ Object { }, "range": Array [ 0, - 41, + 28, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -71417,14 +101647,14 @@ Object { }, "range": Array [ 0, - 42, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -71434,64 +101664,64 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 8, + 9, + 10, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 10, + 11, + 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -71500,21 +101730,21 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, + 12, 13, - ], - "type": "Identifier", - "value": "of", + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { @@ -71524,97 +101754,97 @@ Object { }, "range": Array [ 14, - 17, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ - 17, - 18, + 16, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, "range": Array [ - 19, - 20, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 25, - 36, + 23, + 24, ], "type": "Identifier", - "value": "doSomething", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 36, - 37, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 37, - 38, + 26, + 27, ], "type": "Punctuator", "value": ")", @@ -71622,162 +101852,111 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 38, - 39, + 27, + 28, ], "type": "Punctuator", "value": ";", }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": null, + "delegate": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "YieldExpression", }, - }, - "name": "doSomething", - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 37, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 22, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 14, + 24, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 24, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 24, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { "column": 0, @@ -71786,34 +101965,16 @@ Object { }, "range": Array [ 0, - 37, + 26, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -71822,14 +101983,14 @@ Object { }, "range": Array [ 0, - 38, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -71839,64 +102000,64 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 8, + 9, + 10, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 10, + 11, + 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -71905,21 +102066,21 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, + 12, 13, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { @@ -71929,79 +102090,79 @@ Object { }, "range": Array [ 14, - 17, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ - 17, - 18, + 16, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 23, - 34, + 21, + 22, ], - "type": "Identifier", - "value": "doSomething", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 34, - 35, + 23, + 24, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 35, - 36, + 24, + 25, ], "type": "Punctuator", "value": ")", @@ -72009,17 +102170,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 36, - 37, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -72029,124 +102190,128 @@ Object { } `; -exports[`ecmaFeatures fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-in-call.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 39, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "argument": null, + "delegate": false, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "YieldExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "fn", + "range": Array [ + 16, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 25, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 12, + "column": 26, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 11, - 12, + 16, + 26, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 11, - 12, - ], - "type": "VariableDeclarator", }, - ], - "kind": "const", + "range": Array [ + 14, + 28, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 12, + "column": 28, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 12, + 1, + 28, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { "column": 0, @@ -72155,34 +102320,16 @@ Object { }, "range": Array [ 0, - 39, + 30, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -72191,14 +102338,14 @@ Object { }, "range": Array [ 0, - 40, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -72208,28 +102355,28 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -72238,16 +102385,16 @@ Object { "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, + 9, 10, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { @@ -72264,31 +102411,49 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, 15, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 18, "line": 1, }, "start": Object { @@ -72298,15 +102463,33 @@ Object { }, "range": Array [ 16, - 19, + 18, ], "type": "Identifier", - "value": "foo", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, "line": 1, }, "start": Object { @@ -72316,7 +102499,25 @@ Object { }, "range": Array [ 19, - 20, + 24, + ], + "type": "Keyword", + "value": "yield", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, ], "type": "Punctuator", "value": ")", @@ -72324,53 +102525,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ 25, - 36, + 26, ], - "type": "Identifier", - "value": "doSomething", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 36, - 37, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 37, - 38, + 28, + 29, ], "type": "Punctuator", "value": ")", @@ -72378,17 +102579,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 38, - 39, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -72398,124 +102599,91 @@ Object { } `; -exports[`ecmaFeatures fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-no-semi.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": null, + "delegate": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "YieldExpression", }, - }, - "name": "doSomething", - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 37, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 21, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 21, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "let", + "range": Array [ + 14, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 23, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 23, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { "column": 0, @@ -72524,240 +102692,399 @@ Object { }, "range": Array [ 0, - 37, + 25, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "*", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, - 3, + 16, + 21, ], "type": "Keyword", - "value": "for", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 23, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, "range": Array [ - 4, - 5, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 24, "line": 1, }, "start": Object { - "column": 5, + "column": 23, "line": 1, }, }, "range": Array [ - 5, - 8, + 23, + 24, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 25, "line": 1, }, "start": Object { - "column": 9, + "column": 24, "line": 1, }, }, "range": Array [ - 9, - 10, + 24, + 25, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` +Object { + "body": Array [ Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "fooz", + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 13, + 0, + 12, ], - "type": "Identifier", - "value": "of", + "type": "ReturnStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 17, + 0, + 6, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 7, "line": 1, }, }, "range": Array [ - 17, - 18, + 7, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "fooz", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 23, - 34, + 11, + 12, ], - "type": "Identifier", - "value": "doSomething", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` +Object { + "body": Array [ Object { + "argument": null, "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 34, - 35, + 0, + 7, ], - "type": "Punctuator", - "value": "(", + "type": "ReturnStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 8, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 36, - 37, + 6, + 7, ], "type": "Punctuator", "value": ";", @@ -72767,107 +103094,32 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/anonymous-generator.src 1`] = ` +exports[`javascript fixtures/globalReturn/return-true.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": null, + "argument": Object { "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 25, + 7, + 11, ], - "type": "FunctionExpression", + "raw": "true", + "type": "Literal", + "value": true, }, "loc": Object { "end": Object { - "column": 27, + "column": 12, "line": 1, }, "start": Object { @@ -72877,16 +103129,16 @@ Object { }, "range": Array [ 0, - 27, + 12, ], - "type": "ExpressionStatement", + "type": "ReturnStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -72895,14 +103147,14 @@ Object { }, "range": Array [ 0, - 27, + 13, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -72912,46 +103164,28 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, + 6, ], "type": "Keyword", - "value": "function", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 11, ], - "type": "Punctuator", - "value": "*", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { @@ -72969,130 +103203,244 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "meta": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "import", + "range": Array [ + 0, + 6, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "meta", + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 0, + 11, + ], + "type": "MetaProperty", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "url", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 0, + 15, + ], + "type": "MemberExpression", + }, "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 16, ], - "type": "Punctuator", - "value": ")", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 21, + 6, + 7, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 11, ], "type": "Identifier", - "value": "v", + "value": "meta", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, "range": Array [ - 24, - 25, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 15, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, "range": Array [ - 25, - 26, + 12, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "url", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 26, + "column": 15, "line": 1, }, }, "range": Array [ - 26, - 27, + 15, + 16, ], "type": "Punctuator", "value": ";", @@ -73102,81 +103450,167 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/async-generator-function.src 1`] = ` +exports[`javascript fixtures/labels/label-break.src 1`] = ` Object { "body": Array [ Object { - "async": true, "body": Object { - "body": Array [], + "body": Object { + "body": Array [ + Object { + "label": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "name": "loop1", + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 27, + 39, + ], + "type": "BreakStatement", + }, + Object { + "label": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 44, + 50, + ], + "type": "BreakStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 21, + 54, + ], + "type": "BlockStatement", + }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 3, + "line": 5, }, "start": Object { - "column": 22, + "column": 2, "line": 2, }, }, "range": Array [ - 23, - 27, + 9, + 54, ], - "type": "BlockStatement", + "test": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 15, + 19, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "WhileStatement", }, - "expression": false, - "generator": true, - "id": Object { + "label": Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 1, }, }, - "name": "foo", + "name": "loop1", "range": Array [ - 17, - 20, + 0, + 5, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 27, + 0, + 54, ], - "type": "FunctionDeclaration", + "type": "LabeledStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 6, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 1, - 28, + 0, + 55, ], "sourceType": "module", "tokens": Array [ @@ -73184,100 +103618,118 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 2, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 1, - 6, + 0, + 5, ], "type": "Identifier", - "value": "async", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, "line": 2, }, "start": Object { - "column": 6, + "column": 2, "line": 2, }, }, "range": Array [ - 7, - 15, + 9, + 14, ], "type": "Keyword", - "value": "function", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 2, }, "start": Object { - "column": 15, + "column": 7, "line": 2, }, }, "range": Array [ - 16, - 17, + 14, + 15, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 2, }, "start": Object { - "column": 16, + "column": 8, "line": 2, }, }, "range": Array [ - 17, - 20, + 15, + 19, ], - "type": "Identifier", - "value": "foo", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 13, "line": 2, }, "start": Object { - "column": 19, + "column": 12, "line": 2, }, }, "range": Array [ + 19, 20, - 21, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 15, "line": 2, }, "start": Object { - "column": 20, + "column": 14, "line": 2, }, }, @@ -73286,40 +103738,112 @@ Object { 22, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 22, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 23, - 24, + 27, + 32, + ], + "type": "Keyword", + "value": "break", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + "value": "loop1", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 9, "line": 4, }, "start": Object { - "column": 0, + "column": 4, "line": 4, }, }, "range": Array [ - 26, - 27, + 44, + 49, + ], + "type": "Keyword", + "value": "break", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 53, + 54, ], "type": "Punctuator", "value": "}", @@ -73329,238 +103853,139 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/async-generator-method.src 1`] = ` +exports[`javascript fixtures/labels/label-continue.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "f", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 63, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - }, - "init": Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "name": "g", - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "CallExpression", - }, - "delegate": true, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 46, - 56, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 42, - 56, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 36, - 57, - ], - "type": "VariableDeclaration", - }, - ], + "body": Object { + "body": Array [ + Object { + "label": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 18, + "line": 3, }, - "start": Object { - "column": 16, - "line": 2, + "start": Object { + "column": 13, + "line": 3, }, }, + "name": "loop1", "range": Array [ - 26, - 63, + 36, + 41, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": true, - "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 19, + "line": 3, }, "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 27, + 42, + ], + "type": "ContinueStatement", + }, + Object { + "label": null, + "loc": Object { + "end": Object { "column": 13, - "line": 2, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, }, }, - "params": Array [], "range": Array [ - 23, - 63, + 47, + 56, ], - "type": "FunctionExpression", + "type": "ContinueStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 2, }, }, - ], + "range": Array [ + 21, + 60, + ], + "type": "BlockStatement", + }, "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { - "column": 8, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 8, - 65, + 9, + 60, ], - "type": "ClassBody", + "test": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 15, + 19, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "WhileStatement", }, - "id": Object { + "label": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "C", + "name": "loop1", "range": Array [ - 6, - 7, + 0, + 5, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { @@ -73570,10 +103995,9 @@ Object { }, "range": Array [ 0, - 65, + 60, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "LabeledStatement", }, ], "comments": Array [], @@ -73589,7 +104013,7 @@ Object { }, "range": Array [ 0, - 66, + 61, ], "sourceType": "module", "tokens": Array [ @@ -73608,131 +104032,95 @@ Object { 0, 5, ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], "type": "Identifier", - "value": "C", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ + 9, 14, - 19, ], - "type": "Identifier", - "value": "async", + "type": "Keyword", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 2, }, "start": Object { - "column": 10, + "column": 7, "line": 2, }, }, "range": Array [ - 20, - 21, + 14, + 15, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { "column": 12, "line": 2, }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, "start": Object { - "column": 13, + "column": 8, "line": 2, }, }, "range": Array [ - 23, - 24, + 15, + 19, ], - "type": "Punctuator", - "value": "(", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 2, }, "start": Object { - "column": 14, + "column": 12, "line": 2, }, }, "range": Array [ - 24, - 25, + 19, + 20, ], "type": "Punctuator", "value": ")", @@ -73740,17 +104128,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 2, }, "start": Object { - "column": 16, + "column": 14, "line": 2, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], "type": "Punctuator", "value": "{", @@ -73758,61 +104146,43 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 3, }, "start": Object { - "column": 8, + "column": 4, "line": 3, }, }, "range": Array [ - 36, - 41, + 27, + 35, ], "type": "Keyword", - "value": "const", + "value": "continue", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 3, }, "start": Object { - "column": 14, + "column": 13, "line": 3, }, }, "range": Array [ - 42, - 43, + 36, + 41, ], "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "=", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 3, }, "start": Object { @@ -73821,75 +104191,39 @@ Object { }, }, "range": Array [ - 46, - 51, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, + 41, + 42, ], "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "g", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 12, + "line": 4, }, "start": Object { - "column": 26, - "line": 3, + "column": 4, + "line": 4, }, }, "range": Array [ - 54, + 47, 55, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "continue", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 13, + "line": 4, }, "start": Object { - "column": 27, - "line": 3, + "column": 12, + "line": 4, }, }, "range": Array [ @@ -73897,58 +104231,22 @@ Object { 56, ], "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { - "column": 0, + "column": 2, "line": 5, }, }, "range": Array [ - 64, - 65, + 59, + 60, ], "type": "Punctuator", "value": "}", @@ -73958,136 +104256,133 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/double-yield.src 1`] = ` +exports[`javascript fixtures/modules/error-delete.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 30, - ], - "type": "YieldExpression", - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 30, - ], - "type": "YieldExpression", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "raw": "\\"x\\"", + "type": "Literal", + "value": "x", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 16, - 30, - ], - "type": "ExpressionStatement", }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 8, ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", + }, + Object { + "expression": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 7, + "line": 2, }, }, + "name": "x", "range": Array [ - 14, - 32, + 26, + 27, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": true, - "id": null, "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 0, + "line": 2, }, }, - "params": Array [], - "range": Array [ - 1, - 32, + "operator": "delete", + "prefix": true, + "range": Array [ + 19, + 27, ], - "type": "FunctionExpression", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 34, + 19, + 28, ], "type": "ExpressionStatement", }, @@ -74095,8 +104390,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -74105,14 +104400,14 @@ Object { }, "range": Array [ 0, - 34, + 29, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -74122,64 +104417,28 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, + 6, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, "range": Array [ - 11, - 12, + 7, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -74188,21 +104447,21 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, + 9, 13, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { @@ -74212,115 +104471,79 @@ Object { }, "range": Array [ 14, - 15, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, - 21, + 17, + 18, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 22, - 27, + 19, + 25, ], "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", + "value": "delete", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 32, - 33, + 26, + 27, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 33, - 34, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -74330,53 +104553,89 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/empty-generator-declaration.src 1`] = ` +exports[`javascript fixtures/modules/error-function.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [], + "body": Array [ + Object { + "declaration": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "friends", + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 16, + 39, + ], + "type": "ExportDefaultDeclaration", + }, + ], "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, "range": Array [ - 14, - 16, + 13, + 41, ], "type": "BlockStatement", }, "expression": false, - "generator": true, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "t", + "name": "x", "range": Array [ + 9, 10, - 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -74386,33 +104645,16 @@ Object { "params": Array [], "range": Array [ 0, - 16, + 41, ], "type": "FunctionDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "EmptyStatement", - }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -74421,7 +104663,7 @@ Object { }, "range": Array [ 0, - 17, + 43, ], "sourceType": "module", "tokens": Array [ @@ -74446,20 +104688,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 10, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -74476,8 +104718,8 @@ Object { 10, 11, ], - "type": "Identifier", - "value": "t", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -74495,222 +104737,365 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 1, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 14, - 15, + 23, + 30, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { "column": 16, - "line": 1, + "line": 2, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + "value": "friends", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 15, - 16, + 38, + 39, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 16, - 17, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/generators/generator-declaration.src 1`] = ` +exports[`javascript fixtures/modules/error-strict.src 1`] = ` Object { "body": Array [ Object { - "async": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 25, + ], + "raw": "\\"house\\"", + "type": "Literal", + "value": "house", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "house", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 12, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", + }, + Object { "body": Object { "body": Array [ Object { "expression": Object { - "argument": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "name": "roof", + "range": Array [ + 56, + 60, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "computed": false, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 4, }, }, - "name": "v", + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "name": "console", + "range": Array [ + 44, + 51, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "log", + "range": Array [ + 52, + 55, + ], + "type": "Identifier", + }, "range": Array [ - 27, - 28, + 44, + 55, ], - "type": "Identifier", + "type": "MemberExpression", }, - "delegate": true, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 20, - 28, + 44, + 61, ], - "type": "YieldExpression", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 20, - 28, + 44, + 62, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 18, - 30, + 41, + 64, ], "type": "BlockStatement", }, - "expression": false, - "generator": true, - "id": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "object": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 3, }, }, - "name": "test", + "name": "house", "range": Array [ - 10, - 14, + 34, + 39, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 30, - ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, "range": Array [ - 30, - 31, + 28, + 64, ], - "type": "EmptyStatement", + "type": "WithStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -74719,14 +105104,14 @@ Object { }, "range": Array [ 0, - 31, + 65, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -74736,64 +105121,28 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "*", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 12, ], "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", + "value": "house", }, Object { "loc": Object { @@ -74802,21 +105151,21 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 13, "line": 1, }, }, "range": Array [ - 16, + 13, 17, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 25, "line": 1, }, "start": Object { @@ -74826,252 +105175,61 @@ Object { }, "range": Array [ 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, 25, ], - "type": "Keyword", - "value": "yield", + "type": "String", + "value": "\\"house\\"", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { "column": 26, "line": 1, }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, "start": Object { - "column": 30, + "column": 25, "line": 1, }, }, "range": Array [ - 30, - 31, + 25, + 26, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/generators/yield-delegation.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "delegate": true, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 26, - ], - "type": "FunctionExpression", - }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, 28, + 32, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "with", }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 0, - 1, + 33, + 34, ], "type": "Punctuator", "value": "(", @@ -75079,290 +105237,231 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 1, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 1, - 9, + 34, + 39, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "house", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 9, - 10, + 39, + 40, ], "type": "Punctuator", - "value": "*", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 11, - 12, + 41, + 42, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 12, - 13, + 44, + 51, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "console", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 4, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 14, - 15, + 51, + 52, ], "type": "Punctuator", - "value": "{", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 16, - 21, + 52, + 55, ], - "type": "Keyword", - "value": "yield", + "type": "Identifier", + "value": "log", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 4, }, }, "range": Array [ - 22, - 23, + 55, + 56, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 4, }, }, - "range": Array [ - 23, - 24, + "range": Array [ + 56, + 60, ], "type": "Identifier", - "value": "v", + "value": "roof", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 25, - 26, + 60, + 61, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 26, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 26, - 27, + 61, + 62, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 27, - 28, + 63, + 64, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/generators/yield-without-value.src 1`] = ` +exports[`javascript fixtures/modules/export-default-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": null, + "declaration": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 24, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 24, + 15, + 17, ], - "type": "FunctionExpression", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 26, + "column": 18, "line": 1, }, "start": Object { @@ -75372,9 +105471,9 @@ Object { }, "range": Array [ 0, - 26, + 18, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], @@ -75390,14 +105489,14 @@ Object { }, "range": Array [ 0, - 27, + 19, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -75407,105 +105506,51 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, + 6, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, "range": Array [ - 11, - 12, + 7, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { "column": 15, "line": 1, }, - "start": Object { - "column": 14, - "line": 1, - }, }, "range": Array [ - 14, 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { @@ -75515,79 +105560,25 @@ Object { }, "range": Array [ 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, + 17, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -75597,128 +105588,51 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/yield-without-value-in-call.src 1`] = ` +exports[`javascript fixtures/modules/export-default-class.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, + "declaration": Object { "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "YieldExpression", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "fn", - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 25, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 26, - ], - "type": "ExpressionStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, + "column": 21, "line": 1, }, }, "range": Array [ - 14, - 28, + 21, + 25, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": true, "id": null, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 28, + 15, + 25, ], - "type": "FunctionExpression", + "superClass": null, + "type": "ClassDeclaration", }, "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -75727,16 +105641,16 @@ Object { }, "range": Array [ 0, - 30, + 25, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -75745,14 +105659,14 @@ Object { }, "range": Array [ 0, - 31, + 26, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -75762,133 +105676,232 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 9, + 7, + 14, ], "type": "Keyword", - "value": "function", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 20, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 10, + 15, + 20, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 21, "line": 1, }, }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-default-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "operator": "+", + "range": Array [ + 16, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "type": "BinaryExpression", + }, "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "ExportDefaultDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 7, "line": 1, }, }, "range": Array [ - 16, - 18, + 7, + 14, ], - "type": "Identifier", - "value": "fn", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -75896,89 +105909,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, "range": Array [ - 24, - 25, + 16, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 19, "line": 1, }, "start": Object { - "column": 25, + "column": 18, "line": 1, }, }, "range": Array [ - 25, - 26, + 18, + 19, ], "type": "Punctuator", - "value": ";", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { - "column": 27, + "column": 20, "line": 1, }, }, "range": Array [ - 27, - 28, + 20, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 22, "line": 1, }, "start": Object { - "column": 28, + "column": 21, "line": 1, }, }, "range": Array [ - 28, - 29, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -75986,17 +105981,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 23, "line": 1, }, "start": Object { - "column": 29, + "column": 22, "line": 1, }, }, "range": Array [ - 29, - 30, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -76006,90 +106001,53 @@ Object { } `; -exports[`ecmaFeatures fixtures/generators/yield-without-value-no-semi.src 1`] = ` +exports[`javascript fixtures/modules/export-default-function.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "declaration": Object { "async": false, "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "ExpressionStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 23, + "column": 29, "line": 1, }, "start": Object { - "column": 14, + "column": 27, "line": 1, }, }, "range": Array [ - 14, - 23, + 27, + 29, ], "type": "BlockStatement", }, "expression": false, - "generator": true, + "generator": false, "id": null, "loc": Object { "end": Object { - "column": 23, + "column": 29, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, "params": Array [], "range": Array [ - 1, - 23, + 15, + 29, ], - "type": "FunctionExpression", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 25, + "column": 29, "line": 1, }, "start": Object { @@ -76099,9 +106057,9 @@ Object { }, "range": Array [ 0, - 25, + 29, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], @@ -76117,14 +106075,14 @@ Object { }, "range": Array [ 0, - 26, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -76134,61 +106092,61 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 9, + 7, + 14, ], "type": "Keyword", - "value": "function", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 23, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 10, + 15, + 23, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 25, "line": 1, }, "start": Object { - "column": 11, + "column": 24, "line": 1, }, }, "range": Array [ - 11, - 12, + 24, + 25, ], "type": "Punctuator", "value": "(", @@ -76196,17 +106154,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 26, "line": 1, }, "start": Object { - "column": 12, + "column": 25, "line": 1, }, }, "range": Array [ - 12, - 13, + 25, + 26, ], "type": "Punctuator", "value": ")", @@ -76214,17 +106172,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 28, "line": 1, }, "start": Object { - "column": 14, + "column": 27, "line": 1, }, }, "range": Array [ - 14, - 15, + 27, + 28, ], "type": "Punctuator", "value": "{", @@ -76232,106 +106190,88 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, + "column": 29, "line": 1, }, "start": Object { - "column": 22, + "column": 28, "line": 1, }, }, "range": Array [ - 22, - 23, + 28, + 29, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/globalReturn/return-identifier.src 1`] = ` +exports[`javascript fixtures/modules/export-default-named-class.src 1`] = ` Object { "body": Array [ Object { - "argument": Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 30, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 21, + 25, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, - "name": "fooz", "range": Array [ - 7, - 11, + 15, + 30, ], - "type": "Identifier", + "superClass": null, + "type": "ClassDeclaration", }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -76340,16 +106280,16 @@ Object { }, "range": Array [ 0, - 12, + 30, ], - "type": "ReturnStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -76358,7 +106298,7 @@ Object { }, "range": Array [ 0, - 13, + 31, ], "sourceType": "module", "tokens": Array [ @@ -76378,12 +106318,12 @@ Object { 6, ], "type": "Keyword", - "value": "return", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { @@ -76393,42 +106333,152 @@ Object { }, "range": Array [ 7, - 11, + 14, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 25, ], "type": "Identifier", - "value": "fooz", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, "line": 1, }, - "start": Object { - "column": 11, - "line": 1, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-default-named-function.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 32, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, + "params": Array [], + "range": Array [ + 15, + 32, + ], + "type": "FunctionDeclaration", }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/globalReturn/return-no-arg.src 1`] = ` -Object { - "body": Array [ - Object { - "argument": null, "loc": Object { "end": Object { - "column": 7, + "column": 32, "line": 1, }, "start": Object { @@ -76438,9 +106488,9 @@ Object { }, "range": Array [ 0, - 7, + 32, ], - "type": "ReturnStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], @@ -76456,7 +106506,7 @@ Object { }, "range": Array [ 0, - 8, + 33, ], "sourceType": "module", "tokens": Array [ @@ -76476,243 +106526,165 @@ Object { 6, ], "type": "Keyword", - "value": "return", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "default", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/globalReturn/return-true.src 1`] = ` -Object { - "body": Array [ Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, }, - "range": Array [ - 7, - 11, - ], - "raw": "true", - "type": "Literal", - "value": true, }, + "range": Array [ + 15, + 23, + ], + "type": "Keyword", + "value": "function", + }, + Object { "loc": Object { "end": Object { - "column": 12, + "column": 27, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 12, + 24, + 27, ], - "type": "ReturnStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + "type": "Identifier", + "value": "foo", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 29, "line": 1, }, "start": Object { - "column": 0, + "column": 28, "line": 1, }, }, "range": Array [ - 0, - 6, + 28, + 29, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 31, "line": 1, }, "start": Object { - "column": 7, + "column": 30, "line": 1, }, }, "range": Array [ - 7, - 11, + 30, + 31, ], - "type": "Boolean", - "value": "true", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 32, "line": 1, }, "start": Object { - "column": 11, + "column": 31, "line": 1, }, }, "range": Array [ - 11, - 12, + 31, + 32, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/importMeta/simple-import-meta.src 1`] = ` +exports[`javascript fixtures/modules/export-default-number.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "computed": false, + "declaration": Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "import", - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "meta", - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 0, - 11, - ], - "type": "MetaProperty", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "url", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, "range": Array [ - 0, 15, + 17, ], - "type": "MemberExpression", + "raw": "42", + "type": "Literal", + "value": 42, }, "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { @@ -76722,9 +106694,9 @@ Object { }, "range": Array [ 0, - 16, + 18, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], @@ -76740,7 +106712,7 @@ Object { }, "range": Array [ 0, - 17, + 19, ], "sourceType": "module", "tokens": Array [ @@ -76760,30 +106732,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { @@ -76793,61 +106747,43 @@ Object { }, "range": Array [ 7, - 11, + 14, ], - "type": "Identifier", - "value": "meta", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { "column": 15, "line": 1, }, - "start": Object { - "column": 12, - "line": 1, - }, }, "range": Array [ - 12, 15, + 17, ], - "type": "Identifier", - "value": "url", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 16, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -76857,142 +106793,109 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/error-delete.src 1`] = ` +exports[`javascript fixtures/modules/export-default-object.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "source": Object { + "declaration": Object { "loc": Object { "end": Object { - "column": 17, + "column": 25, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, - "range": Array [ - 14, - 17, - ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", }, - }, - "local": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 8, + "column": 23, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, - "name": "x", + "method": false, "range": Array [ - 7, - 8, + 17, + 23, ], - "type": "Identifier", - }, - "range": Array [ - 7, - 8, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, }, - "name": "x", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "operator": "delete", - "prefix": true, + ], "range": Array [ - 19, - 27, + 15, + 25, ], - "type": "UnaryExpression", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 19, - 28, + 0, + 26, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -77001,7 +106904,7 @@ Object { }, "range": Array [ 0, - 29, + 27, ], "sourceType": "module", "tokens": Array [ @@ -77021,12 +106924,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { @@ -77036,115 +106939,115 @@ Object { }, "range": Array [ 7, - 8, + 14, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 13, + 15, + 16, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, "range": Array [ - 14, 17, + 20, ], - "type": "String", - "value": "\\"x\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 19, - 25, + 22, + 23, ], - "type": "Keyword", - "value": "delete", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 26, - 27, + 24, + 25, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 27, - 28, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -77154,108 +107057,50 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/error-function.src 1`] = ` +exports[`javascript fixtures/modules/export-default-value.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "friends", - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 16, - 39, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 41, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { + "declaration": Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ - 9, - 10, + 15, + 18, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 41, + 19, ], - "type": "FunctionDeclaration", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -77264,14 +107109,14 @@ Object { }, "range": Array [ 0, - 43, + 20, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -77281,97 +107126,141 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 14, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 11, + 15, + 18, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, "range": Array [ - 11, - 12, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-batch.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 0, "line": 1, }, }, "range": Array [ - 13, - 14, + 0, + 20, ], - "type": "Punctuator", - "value": "{", + "source": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 19, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "type": "ExportAllDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 1, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 16, - 22, + 0, + 6, ], "type": "Keyword", "value": "export", @@ -77379,324 +107268,181 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 23, - 30, + 7, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 31, - 38, + 9, + 13, ], "type": "Identifier", - "value": "friends", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 38, - 39, + 14, + 19, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 40, - 41, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } -`; - -exports[`ecmaFeatures fixtures/modules/error-strict.src 1`] = ` -Object { - "body": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "raw": "\\"house\\"", - "type": "Literal", - "value": "house", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "house", - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - }, - "range": Array [ - 7, - 12, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "roof", - "range": Array [ - 56, - 60, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "console", - "range": Array [ - 44, - 51, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "log", - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - }, - "range": Array [ - 44, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 61, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 62, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 41, - 64, - ], - "type": "BlockStatement", - }, +`; + +exports[`javascript fixtures/modules/export-from-default.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": null, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 28, + "line": 1, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, - "object": Object { + "range": Array [ + 0, + 28, + ], + "source": Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 6, - "line": 3, + "column": 22, + "line": 1, }, }, - "name": "house", "range": Array [ - 34, - 39, + 22, + 27, ], - "type": "Identifier", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "range": Array [ - 28, - 64, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 15, + ], + "type": "ExportSpecifier", + }, ], - "type": "WithStatement", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -77705,7 +107451,7 @@ Object { }, "range": Array [ 0, - 65, + 29, ], "sourceType": "module", "tokens": Array [ @@ -77725,12 +107471,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { @@ -77740,151 +107486,251 @@ Object { }, "range": Array [ 7, - 12, + 8, ], - "type": "Identifier", - "value": "house", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 8, "line": 1, }, }, "range": Array [ - 13, - 17, + 8, + 15, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 25, + 15, + 16, ], - "type": "String", - "value": "\\"house\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, "range": Array [ - 25, - 26, + 17, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ - 28, - 32, + 22, + 27, ], - "type": "Keyword", - "value": "with", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 33, - 34, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-named-as-default.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 6, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 34, - 39, + 0, + 35, ], - "type": "Identifier", - "value": "house", + "source": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 34, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", + }, + ], + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 41, - 42, + 7, + 8, ], "type": "Punctuator", "value": "{", @@ -77892,189 +107738,228 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 44, - 51, + 8, + 11, ], "type": "Identifier", - "value": "console", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 12, + "line": 1, }, }, "range": Array [ - 51, - 52, + 12, + 14, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 52, - 55, + 15, + 22, ], - "type": "Identifier", - "value": "log", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 55, - 56, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 24, + "line": 1, }, }, "range": Array [ - 56, - 60, + 24, + 28, ], "type": "Identifier", - "value": "roof", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 34, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 29, + "line": 1, }, }, "range": Array [ - 60, - 61, + 29, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 35, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 34, + "line": 1, }, }, "range": Array [ - 61, - 62, + 34, + 35, ], "type": "Punctuator", "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 31, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 63, - 64, + 0, + 31, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-default-array.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "elements": Array [], + "source": Object { "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { - "column": 15, + "column": 25, "line": 1, }, }, "range": Array [ - 15, - 17, + 25, + 30, ], - "type": "ArrayExpression", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 18, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 18, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -78090,7 +107975,7 @@ Object { }, "range": Array [ 0, - 19, + 32, ], "sourceType": "module", "tokens": Array [ @@ -78115,7 +108000,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -78125,46 +108010,46 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 16, + 8, + 11, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 14, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { @@ -78173,267 +108058,241 @@ Object { "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, "range": Array [ - 17, + 15, 18, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "bar", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-default-class.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 25, - ], - "superClass": null, - "type": "ClassDeclaration", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 25, + 18, + 19, ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 24, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, - 6, + 20, + 24, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 30, "line": 1, }, "start": Object { - "column": 7, + "column": 25, "line": 1, }, }, "range": Array [ - 7, - 14, + 25, + 30, ], - "type": "Keyword", - "value": "default", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 31, "line": 1, }, "start": Object { - "column": 15, + "column": 30, "line": 1, }, }, "range": Array [ - 15, - 20, + 30, + 31, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 22, + "column": 40, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 40, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, + "source": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, }, + "range": Array [ + 34, + 39, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-default-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "left": Object { + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 16, + "column": 8, "line": 1, }, }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "range": Array [ - 16, - 17, + 8, + 22, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "ExportSpecifier", }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", }, - }, - "operator": "+", - "range": Array [ - 16, - 21, - ], - "right": Object { "loc": Object { "end": Object { - "column": 21, + "column": 27, "line": 1, }, "start": Object { - "column": 20, + "column": 24, "line": 1, }, }, + "local": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, "range": Array [ - 20, - 21, + 24, + 27, ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 23, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -78449,7 +108308,7 @@ Object { }, "range": Array [ 0, - 24, + 41, ], "sourceType": "module", "tokens": Array [ @@ -78474,7 +108333,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -78484,15 +108343,51 @@ Object { }, "range": Array [ 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, 14, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { @@ -78502,97 +108397,115 @@ Object { }, "range": Array [ 15, - 16, + 22, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { - "column": 16, + "column": 24, "line": 1, }, }, "range": Array [ - 16, - 17, + 24, + 27, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 28, "line": 1, }, "start": Object { - "column": 18, + "column": 27, "line": 1, }, }, "range": Array [ - 18, - 19, + 27, + 28, ], "type": "Punctuator", - "value": "+", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 33, "line": 1, }, "start": Object { - "column": 20, + "column": 29, "line": 1, }, }, "range": Array [ - 20, - 21, + 29, + 33, ], - "type": "Numeric", - "value": "2", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 39, "line": 1, }, "start": Object { - "column": 21, + "column": 34, "line": 1, }, }, "range": Array [ - 21, - 22, + 34, + 39, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 40, "line": 1, }, "start": Object { - "column": 22, + "column": 39, "line": 1, }, }, "range": Array [ - 22, - 23, + 39, + 40, ], "type": "Punctuator", "value": ";", @@ -78602,65 +108515,100 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-default-function.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "BlockStatement", + "declaration": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, + }, + "range": Array [ + 0, + 24, + ], + "source": Object { "loc": Object { "end": Object { - "column": 29, + "column": 23, "line": 1, }, "start": Object { - "column": 15, + "column": 18, "line": 1, }, }, - "params": Array [], "range": Array [ - 15, - 29, + 18, + 23, ], - "type": "FunctionDeclaration", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 11, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 29, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -78676,7 +108624,7 @@ Object { }, "range": Array [ 0, - 30, + 25, ], "sourceType": "module", "tokens": Array [ @@ -78701,7 +108649,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -78711,186 +108659,260 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 23, + 8, + 11, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, "range": Array [ - 24, - 25, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 17, "line": 1, }, "start": Object { - "column": 25, + "column": 13, "line": 1, }, }, "range": Array [ - 25, - 26, + 13, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 23, "line": 1, }, "start": Object { - "column": 27, + "column": 18, "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 23, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 24, "line": 1, }, "start": Object { - "column": 28, + "column": 23, "line": 1, }, }, "range": Array [ - 28, - 29, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/export-default-named-class.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], + "declaration": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 28, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 26, + "column": 8, "line": 1, }, }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "range": Array [ - 26, - 30, + 8, + 11, ], - "type": "ClassBody", + "type": "ExportSpecifier", }, - "id": Object { + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, - "name": "Test", + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, "range": Array [ - 21, - 25, + 13, + 16, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 30, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 30, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -78899,7 +108921,7 @@ Object { }, "range": Array [ 0, - 31, + 30, ], "sourceType": "module", "tokens": Array [ @@ -78924,7 +108946,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -78934,89 +108956,143 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 20, + 8, + 11, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 21, + "column": 11, "line": 1, }, }, "range": Array [ - 21, - 25, + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, ], "type": "Identifier", - "value": "Test", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 17, "line": 1, }, "start": Object { - "column": 26, + "column": 16, "line": 1, }, }, "range": Array [ - 26, - 27, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 28, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/export-default-named-function.src 1`] = ` +exports[`javascript fixtures/modules/export-function.src 1`] = ` Object { "body": Array [ Object { @@ -79026,17 +109102,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 32, + "column": 25, "line": 1, }, "start": Object { - "column": 30, + "column": 23, "line": 1, }, }, "range": Array [ - 30, - 32, + 23, + 25, ], "type": "BlockStatement", }, @@ -79045,41 +109121,41 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 27, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, "name": "foo", "range": Array [ - 24, - 27, + 16, + 19, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 32, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, "params": Array [], "range": Array [ - 15, - 32, + 7, + 25, ], "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 32, + "column": 25, "line": 1, }, "start": Object { @@ -79089,9 +109165,11 @@ Object { }, "range": Array [ 0, - 32, + 25, ], - "type": "ExportDefaultDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -79107,7 +109185,7 @@ Object { }, "range": Array [ 0, - 33, + 26, ], "sourceType": "module", "tokens": Array [ @@ -79132,7 +109210,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -79142,25 +109220,7 @@ Object { }, "range": Array [ 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ 15, - 23, ], "type": "Keyword", "value": "function", @@ -79168,17 +109228,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, "range": Array [ - 24, - 27, + 16, + 19, ], "type": "Identifier", "value": "foo", @@ -79186,17 +109246,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { - "column": 27, + "column": 20, "line": 1, }, }, "range": Array [ - 27, - 28, + 20, + 21, ], "type": "Punctuator", "value": "(", @@ -79204,17 +109264,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 22, "line": 1, }, "start": Object { - "column": 28, + "column": 21, "line": 1, }, }, "range": Array [ - 28, - 29, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -79222,17 +109282,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 24, "line": 1, }, "start": Object { - "column": 30, + "column": 23, "line": 1, }, }, "range": Array [ - 30, - 31, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -79240,17 +109300,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 25, "line": 1, }, "start": Object { - "column": 31, + "column": 24, "line": 1, }, }, "range": Array [ - 31, - 32, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -79260,32 +109320,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-default-number.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-default.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, + "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 24, "line": 1, }, "start": Object { @@ -79295,9 +109337,65 @@ Object { }, "range": Array [ 0, - 18, + 24, ], - "type": "ExportDefaultDeclaration", + "source": null, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", + }, + ], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -79313,7 +109411,7 @@ Object { }, "range": Array [ 0, - 19, + 25, ], "sourceType": "module", "tokens": Array [ @@ -79338,7 +109436,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -79348,15 +109446,51 @@ Object { }, "range": Array [ 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, 14, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { @@ -79366,25 +109500,43 @@ Object { }, "range": Array [ 15, - 17, + 22, ], - "type": "Numeric", - "value": "42", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 22, "line": 1, }, }, "range": Array [ - 17, - 18, + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -79394,102 +109546,82 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-default-object.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "declaration": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "kind": "init", + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "source": null, + "specifiers": Array [ + Object { + "exported": Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, - "method": false, + "name": "bar", "range": Array [ - 17, - 23, + 15, + 18, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", }, - ], - "range": Array [ - 15, - 25, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 8, + 18, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 26, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -79505,7 +109637,7 @@ Object { }, "range": Array [ 0, - 27, + 21, ], "sourceType": "module", "tokens": Array [ @@ -79530,7 +109662,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -79540,25 +109672,7 @@ Object { }, "range": Array [ 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, + 8, ], "type": "Punctuator", "value": "{", @@ -79566,17 +109680,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "range": Array [ - 17, - 20, + 8, + 11, ], "type": "Identifier", "value": "foo", @@ -79584,53 +109698,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 14, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 22, + "column": 15, "line": 1, }, }, "range": Array [ - 22, - 23, + 15, + 18, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 18, "line": 1, }, }, "range": Array [ - 24, - 25, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -79638,17 +109752,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, + "column": 20, "line": 1, }, "start": Object { - "column": 25, + "column": 19, "line": 1, }, }, "range": Array [ - 25, - 26, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -79658,31 +109772,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-default-value.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, + "declaration": null, "loc": Object { "end": Object { - "column": 19, + "column": 29, "line": 1, }, "start": Object { @@ -79692,9 +109789,118 @@ Object { }, "range": Array [ 0, - 19, + 29, + ], + "source": null, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", + }, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "range": Array [ + 24, + 27, + ], + "type": "ExportSpecifier", + }, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -79710,7 +109916,7 @@ Object { }, "range": Array [ 0, - 20, + 30, ], "sourceType": "module", "tokens": Array [ @@ -79735,7 +109941,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -79745,15 +109951,51 @@ Object { }, "range": Array [ 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, 14, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { @@ -79763,79 +110005,170 @@ Object { }, "range": Array [ 15, - 18, + 22, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 27, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 28, "line": 1, }, "start": Object { - "column": 18, + "column": 27, "line": 1, }, }, "range": Array [ - 18, - 19, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-from-batch.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 0, + "column": 28, "line": 1, }, }, "range": Array [ - 0, - 20, + 28, + 29, ], - "source": Object { + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-named-class.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 13, + 17, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, "range": Array [ - 14, - 19, + 7, + 22, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "superClass": null, + "type": "ClassDeclaration", }, - "type": "ExportAllDeclaration", + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -79844,7 +110177,7 @@ Object { }, "range": Array [ 0, - 21, + 23, ], "sourceType": "module", "tokens": Array [ @@ -79869,7 +110202,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -79879,28 +110212,28 @@ Object { }, "range": Array [ 7, - 8, + 12, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, 13, + 17, ], "type": "Identifier", - "value": "from", + "value": "Test", }, Object { "loc": Object { @@ -79909,48 +110242,48 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 18, "line": 1, }, }, "range": Array [ - 14, + 18, 19, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 19, - 20, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/export-from-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 28, + "column": 10, "line": 1, }, "start": Object { @@ -79960,82 +110293,10 @@ Object { }, "range": Array [ 0, - 28, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 15, - ], - "type": "ExportSpecifier", - }, + 10, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -80052,7 +110313,7 @@ Object { }, "range": Array [ 0, - 29, + 11, ], "sourceType": "module", "tokens": Array [ @@ -80095,7 +110356,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { @@ -80105,25 +110366,7 @@ Object { }, "range": Array [ 8, - 15, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, + 9, ], "type": "Punctuator", "value": "}", @@ -80131,53 +110374,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, + "column": 10, "line": 1, }, "start": Object { - "column": 27, + "column": 9, "line": 1, }, }, "range": Array [ - 27, - 28, + 9, + 10, ], "type": "Punctuator", "value": ";", @@ -80187,14 +110394,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-from-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 35, + "column": 13, "line": 1, }, "start": Object { @@ -80204,50 +110411,32 @@ Object { }, "range": Array [ 0, - 35, + 13, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, + "source": null, "specifiers": Array [ Object { "exported": Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ - 15, - 22, + 8, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { @@ -80275,189 +110464,117 @@ Object { }, "range": Array [ 8, - 22, + 11, ], "type": "ExportSpecifier", }, ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 6, "line": 1, }, "start": Object { - "column": 15, + "column": 0, "line": 1, }, }, "range": Array [ - 15, - 22, + 0, + 6, ], "type": "Keyword", - "value": "default", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 8, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, "range": Array [ - 24, - 28, + 8, + 11, ], "type": "Identifier", - "value": "from", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 12, "line": 1, }, "start": Object { - "column": 29, + "column": 11, "line": 1, }, }, "range": Array [ - 29, - 34, + 11, + 12, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 13, "line": 1, }, "start": Object { - "column": 34, + "column": 12, "line": 1, }, }, "range": Array [ - 34, - 35, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -80467,14 +110584,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-from-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { @@ -80484,50 +110601,32 @@ Object { }, "range": Array [ 0, - 31, + 18, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, + "source": null, "specifiers": Array [ Object { "exported": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ - 15, - 18, + 8, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { @@ -80555,7 +110654,60 @@ Object { }, "range": Array [ 8, - 18, + 11, + ], + "type": "ExportSpecifier", + }, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, ], "type": "ExportSpecifier", }, @@ -80576,7 +110728,7 @@ Object { }, "range": Array [ 0, - 32, + 19, ], "sourceType": "module", "tokens": Array [ @@ -80637,35 +110789,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 14, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 18, + 13, + 16, ], "type": "Identifier", "value": "bar", @@ -80673,17 +110825,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 17, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 19, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -80691,53 +110843,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { - "column": 30, + "column": 17, "line": 1, }, }, "range": Array [ - 30, - 31, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -80747,14 +110863,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 40, + "column": 19, "line": 1, }, "start": Object { @@ -80764,50 +110880,32 @@ Object { }, "range": Array [ 0, - 40, + 19, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 39, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, + "source": null, "specifiers": Array [ Object { "exported": Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ - 15, - 22, + 8, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { @@ -80835,7 +110933,7 @@ Object { }, "range": Array [ 8, - 22, + 11, ], "type": "ExportSpecifier", }, @@ -80843,52 +110941,52 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "name": "bar", "range": Array [ - 24, - 27, + 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "name": "bar", "range": Array [ - 24, - 27, + 13, + 16, ], "type": "Identifier", }, "range": Array [ - 24, - 27, + 13, + 16, ], "type": "ExportSpecifier", }, @@ -80909,7 +111007,7 @@ Object { }, "range": Array [ 0, - 41, + 20, ], "sourceType": "module", "tokens": Array [ @@ -80970,53 +111068,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 14, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 22, + 13, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": ",", @@ -81024,191 +111122,332 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 18, "line": 1, }, "start": Object { - "column": 24, + "column": 17, "line": 1, }, }, "range": Array [ - 24, - 27, + 17, + 18, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 19, "line": 1, }, "start": Object { - "column": 27, + "column": 18, "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-var.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 15, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 33, + "column": 15, "line": 1, }, "start": Object { - "column": 29, + "column": 0, "line": 1, }, }, "range": Array [ - 29, - 33, + 0, + 15, ], - "type": "Identifier", - "value": "from", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 39, + "column": 6, "line": 1, }, "start": Object { - "column": 34, + "column": 0, "line": 1, }, }, "range": Array [ - 34, - 39, + 0, + 6, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 10, "line": 1, }, "start": Object { - "column": 39, + "column": 7, "line": 1, }, }, "range": Array [ - 39, - 40, + 7, + 10, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "var", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-from-specifier.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 24, + "column": 14, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 24, + 11, + 14, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "init": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 31, + ], + "type": "FunctionExpression", }, - }, - "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 31, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, - "name": "foo", "range": Array [ - 8, 11, + 31, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 32, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 32, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -81225,7 +111464,7 @@ Object { }, "range": Array [ 0, - 25, + 33, ], "sourceType": "module", "tokens": Array [ @@ -81250,7 +111489,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -81260,25 +111499,25 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, 11, + 14, ], "type": "Identifier", "value": "foo", @@ -81286,226 +111525,228 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 15, "line": 1, }, }, "range": Array [ - 11, - 12, + 15, + 16, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 25, "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "range": Array [ - 13, 17, + 25, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 18, + "column": 26, "line": 1, }, }, "range": Array [ - 18, - 23, + 26, + 27, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 28, "line": 1, }, "start": Object { - "column": 23, + "column": 27, "line": 1, }, }, "range": Array [ - 23, - 24, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-from-specifiers.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 29, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, 29, + 30, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-var-number.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, }, + "range": Array [ + 17, + 18, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 11, "line": 1, }, }, - "name": "bar", "range": Array [ - 13, - 16, + 11, + 18, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 13, - 16, - ], - "type": "ExportSpecifier", }, + "range": Array [ + 7, + 19, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -81522,7 +111763,7 @@ Object { }, "range": Array [ 0, - 30, + 20, ], "sourceType": "module", "tokens": Array [ @@ -81547,7 +111788,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -81557,33 +111798,15 @@ Object { }, "range": Array [ 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, + 10, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -81593,97 +111816,61 @@ Object { }, "range": Array [ 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, + 14, ], "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 22, + 15, + 16, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 28, + 17, + 18, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { - "column": 28, + "column": 18, "line": 1, }, }, "range": Array [ - 28, - 29, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -81693,84 +111880,81 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-function.src 1`] = ` +exports[`javascript fixtures/modules/import-default.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 22, + ], + "source": Object { "loc": Object { "end": Object { - "column": 25, + "column": 21, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, - "params": Array [], "range": Array [ - 7, - 25, + 16, + 21, ], - "type": "FunctionDeclaration", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", }, - }, - "range": Array [ - 0, - 25, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -81786,7 +111970,7 @@ Object { }, "range": Array [ 0, - 26, + 23, ], "sourceType": "module", "tokens": Array [ @@ -81806,12 +111990,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -81821,28 +112005,28 @@ Object { }, "range": Array [ 7, - 15, + 10, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 11, "line": 1, }, }, "range": Array [ - 16, - 19, + 11, + 15, ], "type": "Identifier", - "value": "foo", + "value": "from", }, Object { "loc": Object { @@ -81851,16 +112035,16 @@ Object { "line": 1, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ - 20, + 16, 21, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { @@ -81878,57 +112062,20 @@ Object { 22, ], "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/export-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 24, + "column": 29, "line": 1, }, "start": Object { @@ -81938,65 +112085,118 @@ Object { }, "range": Array [ 0, - 24, + 29, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 28, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ - 15, - 22, + 7, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 8, - 11, + 13, + 16, ], "type": "Identifier", }, "range": Array [ - 8, - 22, + 13, + 16, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -82012,7 +112212,7 @@ Object { }, "range": Array [ 0, - 25, + 30, ], "sourceType": "module", "tokens": Array [ @@ -82032,12 +112232,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -82047,10 +112247,10 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -82059,21 +112259,21 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, + 10, 11, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { @@ -82083,43 +112283,43 @@ Object { }, "range": Array [ 12, - 14, + 13, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 22, + 13, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -82127,7 +112327,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, "line": 1, }, "start": Object { @@ -82137,7 +112355,25 @@ Object { }, "range": Array [ 23, - 24, + 28, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -82147,14 +112383,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 20, + "column": 32, "line": 1, }, "start": Object { @@ -82164,65 +112399,100 @@ Object { }, "range": Array [ 0, - 20, + 32, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 31, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ - 15, - 18, + 7, + 10, ], "type": "Identifier", }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + Object { "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 12, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 17, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 8, - 11, + 17, + 20, ], "type": "Identifier", }, "range": Array [ - 8, - 18, + 12, + 20, ], - "type": "ExportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -82235,135 +112505,171 @@ Object { "column": 0, "line": 1, }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ + }, + "range": Array [ + 0, + 33, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + "value": "foo", + }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "line": 1, }, }, "range": Array [ - 0, - 6, + 10, + 11, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "range": Array [ - 7, - 8, + 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 11, + 14, + 16, ], "type": "Identifier", - "value": "foo", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 17, "line": 1, }, }, "range": Array [ - 12, - 14, + 17, + 20, ], "type": "Identifier", - "value": "as", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 21, "line": 1, }, }, "range": Array [ - 15, - 18, + 21, + 25, ], "type": "Identifier", - "value": "bar", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 31, "line": 1, }, "start": Object { - "column": 18, + "column": 26, "line": 1, }, }, "range": Array [ - 18, - 19, + 26, + 31, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 32, "line": 1, }, "start": Object { - "column": 19, + "column": 31, "line": 1, }, }, "range": Array [ - 19, - 20, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -82373,14 +112679,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-default-as.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 29, + "column": 35, "line": 1, }, "start": Object { @@ -82390,26 +112695,44 @@ Object { }, "range": Array [ 0, - 29, + 35, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 34, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { - "column": 22, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "name": "default", "range": Array [ + 8, 15, - 22, ], "type": "Identifier", }, @@ -82426,18 +112749,18 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 22, "line": 1, }, "start": Object { - "column": 8, + "column": 19, "line": 1, }, }, "name": "foo", "range": Array [ - 8, - 11, + 19, + 22, ], "type": "Identifier", }, @@ -82445,63 +112768,10 @@ Object { 8, 22, ], - "type": "ExportSpecifier", - }, - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "range": Array [ - 24, - 27, - ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -82517,7 +112787,7 @@ Object { }, "range": Array [ 0, - 30, + 36, ], "sourceType": "module", "tokens": Array [ @@ -82537,7 +112807,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -82560,7 +112830,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { @@ -82570,25 +112840,25 @@ Object { }, "range": Array [ 8, - 11, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 18, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 14, + 16, + 18, ], "type": "Identifier", "value": "as", @@ -82600,16 +112870,16 @@ Object { "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, "range": Array [ - 15, + 19, 22, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -82627,12 +112897,12 @@ Object { 23, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 28, "line": 1, }, "start": Object { @@ -82642,43 +112912,43 @@ Object { }, "range": Array [ 24, - 27, + 28, ], "type": "Identifier", - "value": "bar", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 34, "line": 1, }, "start": Object { - "column": 27, + "column": 29, "line": 1, }, }, "range": Array [ - 27, - 28, + 29, + 34, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 35, "line": 1, }, "start": Object { - "column": 28, + "column": 34, "line": 1, }, }, "range": Array [ - 28, - 29, + 34, + 35, ], "type": "Punctuator", "value": ";", @@ -82688,104 +112958,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-named-class.src 1`] = ` +exports[`javascript fixtures/modules/import-jquery.src 1`] = ` Object { "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 22, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 22, "line": 1, }, "start": Object { @@ -82795,110 +112974,65 @@ Object { }, "range": Array [ 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 21, 22, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-named-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "source": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "range": Array [ + 14, + 22, + ], + "raw": "\\"jquery\\"", + "type": "Literal", + "value": "jquery", }, - "range": Array [ - 0, - 10, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "$", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 8, + ], + "type": "ImportDefaultSpecifier", + }, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -82914,7 +113048,7 @@ Object { }, "range": Array [ 0, - 11, + 23, ], "sourceType": "module", "tokens": Array [ @@ -82934,7 +113068,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -82951,55 +113085,54 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "$", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 13, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 10, + 14, + 22, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"jquery\\"", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/export-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-module.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { "column": 13, @@ -83014,63 +113147,27 @@ Object { 0, 13, ], - "source": null, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "source": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", }, - ], - "type": "ExportNamedDeclaration", + "range": Array [ + 7, + 12, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [], + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -83106,12 +113203,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -83121,46 +113218,10 @@ Object { }, "range": Array [ 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, 12, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { @@ -83185,14 +113246,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 31, "line": 1, }, "start": Object { @@ -83202,12 +113262,30 @@ Object { }, "range": Array [ 0, - 18, + 31, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 30, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { "column": 11, @@ -83218,7 +113296,7 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ 8, 11, @@ -83227,7 +113305,7 @@ Object { }, "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { @@ -83238,82 +113316,29 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 8, - 11, + 15, + 18, ], "type": "Identifier", }, "range": Array [ 8, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "range": Array [ - 13, - 16, + 18, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -83329,7 +113354,7 @@ Object { }, "range": Array [ 0, - 19, + 32, ], "sourceType": "module", "tokens": Array [ @@ -83349,7 +113374,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -83385,58 +113410,58 @@ Object { 11, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 14, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 16, + 15, + 18, ], "type": "Identifier", - "value": "bar", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -83444,17 +113469,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 24, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 24, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 30, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -83464,14 +113525,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 19, + "column": 36, "line": 1, }, "start": Object { @@ -83481,12 +113541,30 @@ Object { }, "range": Array [ 0, - 19, + 36, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 35, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { "column": 11, @@ -83497,7 +113575,7 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ 8, 11, @@ -83506,7 +113584,7 @@ Object { }, "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { @@ -83517,82 +113595,82 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 8, - 11, + 15, + 18, ], "type": "Identifier", }, "range": Array [ 8, - 11, + 18, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, - "name": "bar", + "name": "xyz", "range": Array [ - 13, - 16, + 20, + 23, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, - "name": "bar", + "name": "xyz", "range": Array [ - 13, - 16, + 20, + 23, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 20, + 23, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -83608,7 +113686,7 @@ Object { }, "range": Array [ 0, - 20, + 37, ], "sourceType": "module", "tokens": Array [ @@ -83628,7 +113706,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -83664,58 +113742,58 @@ Object { 11, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 14, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 16, + 15, + 18, ], "type": "Identifier", - "value": "bar", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], "type": "Punctuator", "value": ",", @@ -83723,17 +113801,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 23, + ], + "type": "Identifier", + "value": "xyz", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", "value": "}", @@ -83741,89 +113837,69 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 29, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, - 19, + 25, + 29, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "from", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-var.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, }, - "range": Array [ - 7, - 15, - ], - "type": "VariableDeclaration", }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-named-empty.src 1`] = ` +Object { + "body": Array [ + Object { "loc": Object { "end": Object { - "column": 15, + "column": 21, "line": 1, }, "start": Object { @@ -83833,11 +113909,29 @@ Object { }, "range": Array [ 0, - 15, + 21, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -83853,7 +113947,7 @@ Object { }, "range": Array [ 0, - 16, + 22, ], "sourceType": "module", "tokens": Array [ @@ -83873,12 +113967,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -83888,10 +113982,28 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -83900,31 +114012,49 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ - 11, + 10, 14, ], "type": "Identifier", - "value": "bar", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 20, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -83934,122 +114064,99 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/export-var-anonymous-function.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "BlockStatement", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 23, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 1, }, - "params": Array [], - "range": Array [ - 17, - 31, - ], - "type": "FunctionExpression", }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 31, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, + "name": "bar", "range": Array [ + 8, 11, - 31, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, + "range": Array [ + 8, + 11, + ], + "type": "ImportSpecifier", }, - "range": Array [ - 7, - 32, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -84065,7 +114172,7 @@ Object { }, "range": Array [ 0, - 33, + 25, ], "sourceType": "module", "tokens": Array [ @@ -84085,12 +114192,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -84100,255 +114207,252 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 11, - 14, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 16, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 17, - 25, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 18, "line": 1, }, }, "range": Array [ - 26, - 27, + 18, + 23, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 24, "line": 1, }, "start": Object { - "column": 27, + "column": 23, "line": 1, }, }, "range": Array [ - 27, - 28, + 23, + 24, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { "column": 29, "line": 1, }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 29, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, + "source": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, }, + "range": Array [ + 23, + 28, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/export-var-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "specifiers": Array [ + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 17, - 18, - ], - "raw": "1", - "type": "Literal", - "value": 1, }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 11, + ], + "type": "ImportSpecifier", + }, + Object { + "imported": Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, + "name": "baz", "range": Array [ - 11, - 18, + 13, + 16, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, - "start": Object { - "column": 7, - "line": 1, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", }, + "range": Array [ + 13, + 16, + ], + "type": "ImportSpecifier", }, - "range": Array [ - 7, - 19, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "comments": Array [], @@ -84364,7 +114468,7 @@ Object { }, "range": Array [ 0, - 20, + 30, ], "sourceType": "module", "tokens": Array [ @@ -84384,12 +114488,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -84399,69 +114503,87 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 11, - 14, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 16, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { "column": 17, "line": 1, }, + "start": Object { + "column": 16, + "line": 1, + }, }, "range": Array [ + 16, 17, - 18, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { @@ -84471,7 +114593,43 @@ Object { }, "range": Array [ 18, - 19, + 22, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 28, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -84481,13 +114639,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-default.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { @@ -84497,22 +114655,22 @@ Object { }, "range": Array [ 0, - 22, + 30, ], "source": Object { "loc": Object { "end": Object { - "column": 21, + "column": 29, "line": 1, }, "start": Object { - "column": 16, + "column": 24, "line": 1, }, }, "range": Array [ - 16, - 21, + 24, + 29, ], "raw": "\\"foo\\"", "type": "Literal", @@ -84520,39 +114678,110 @@ Object { }, "specifiers": Array [ Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 7, - 10, + 8, + 11, ], "type": "Identifier", }, "range": Array [ - 7, - 10, + 8, + 11, ], - "type": "ImportDefaultSpecifier", + "type": "ImportSpecifier", + }, + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, + ], + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -84571,7 +114800,7 @@ Object { }, "range": Array [ 0, - 23, + 31, ], "sourceType": "module", "tokens": Array [ @@ -84596,7 +114825,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -84606,15 +114835,33 @@ Object { }, "range": Array [ 7, - 10, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { @@ -84624,15 +114871,33 @@ Object { }, "range": Array [ 11, - 15, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, ], "type": "Identifier", - "value": "from", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { @@ -84642,7 +114907,61 @@ Object { }, "range": Array [ 16, - 21, + 17, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 29, ], "type": "String", "value": "\\"foo\\"", @@ -84650,17 +114969,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { - "column": 21, + "column": 29, "line": 1, }, }, "range": Array [ - 21, - 22, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -84670,13 +114989,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-default-and-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { @@ -84686,22 +115005,22 @@ Object { }, "range": Array [ 0, - 29, + 27, ], "source": Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, - 28, + 21, + 26, ], "raw": "\\"foo\\"", "type": "Literal", @@ -84711,7 +115030,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -84722,79 +115041,26 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "name": "foo", "range": Array [ - 7, - 10, + 12, + 15, ], "type": "Identifier", }, "range": Array [ 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "range": Array [ - 13, - 16, + 15, ], - "type": "ImportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], "type": "ImportDeclaration", @@ -84813,7 +115079,7 @@ Object { }, "range": Array [ 0, - 30, + 28, ], "sourceType": "module", "tokens": Array [ @@ -84838,7 +115104,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -84848,97 +115114,61 @@ Object { }, "range": Array [ 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, + 8, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 16, + 9, + 11, ], "type": "Identifier", - "value": "bar", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 20, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 22, + 16, + 20, ], "type": "Identifier", "value": "from", @@ -84946,17 +115176,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, - 28, + 21, + 26, ], "type": "String", "value": "\\"foo\\"", @@ -84964,17 +115194,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { - "column": 28, + "column": 26, "line": 1, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -84984,13 +115214,13 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { @@ -85000,71 +115230,54 @@ Object { }, "range": Array [ 0, - 32, + 33, ], "source": Object { "loc": Object { "end": Object { - "column": 31, + "column": 33, "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, - 31, + 28, + 33, ], - "raw": "\\"foo\\"", + "raw": "\\"bar\\"", "type": "Literal", - "value": "foo", + "value": "bar", }, "specifiers": Array [ Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { + "imported": Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, - "name": "foo", + "name": "null", "range": Array [ - 7, - 10, + 9, + 13, ], "type": "Identifier", }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { "loc": Object { "end": Object { "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, @@ -85079,7 +115292,7 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "nil", "range": Array [ 17, 20, @@ -85087,10 +115300,10 @@ Object { "type": "Identifier", }, "range": Array [ - 12, + 9, 20, ], - "type": "ImportNamespaceSpecifier", + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -85109,7 +115322,7 @@ Object { }, "range": Array [ 0, - 33, + 34, ], "sourceType": "module", "tokens": Array [ @@ -85134,7 +115347,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -85144,28 +115357,10 @@ Object { }, "range": Array [ 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, + 8, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { @@ -85174,16 +115369,16 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, + 9, 13, ], - "type": "Punctuator", - "value": "*", + "type": "Null", + "value": "null", }, Object { "loc": Object { @@ -85219,12 +115414,12 @@ Object { 20, ], "type": "Identifier", - "value": "bar", + "value": "nil", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { @@ -85234,145 +115429,129 @@ Object { }, "range": Array [ 21, - 25, + 22, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 27, "line": 1, }, "start": Object { - "column": 26, + "column": 23, "line": 1, }, }, "range": Array [ - 26, - 31, + 23, + 27, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { - "column": 31, + "column": 28, "line": 1, }, }, "range": Array [ - 31, - 32, + 28, + 33, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"bar\\"", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/import-default-as.src 1`] = ` +exports[`javascript fixtures/modules/invalid-await.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "name": "await", + "range": Array [ + 11, + 16, + ], + "type": "Identifier", }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "init": null, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, - "name": "foo", "range": Array [ - 19, - 22, + 11, + 16, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "range": Array [ - 8, - 22, - ], - "type": "ImportSpecifier", + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 17, ], - "type": "ImportDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -85388,7 +115567,7 @@ Object { }, "range": Array [ 0, - 36, + 18, ], "sourceType": "module", "tokens": Array [ @@ -85408,12 +115587,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -85423,33 +115602,33 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 15, + 11, + 16, ], "type": "Keyword", - "value": "default", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { @@ -85459,113 +115638,204 @@ Object { }, "range": Array [ 16, - 18, + 17, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/invalid-class.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 22, + 0, + 23, ], - "type": "Identifier", - "value": "foo", + "type": "ExportDefaultDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 24, + "column": 7, "line": 1, }, }, "range": Array [ - 24, - 28, + 7, + 14, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 20, "line": 1, }, "start": Object { - "column": 29, + "column": 15, "line": 1, }, }, "range": Array [ - 29, - 34, + 15, + 20, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 22, "line": 1, }, "start": Object { - "column": 34, + "column": 21, "line": 1, }, }, "range": Array [ - 34, - 35, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/import-jquery.src 1`] = ` +exports[`javascript fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; + +exports[`javascript fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/modules/invalid-export-named-default.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { @@ -85575,65 +115845,65 @@ Object { }, "range": Array [ 0, - 22, + 16, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 22, - ], - "raw": "\\"jquery\\"", - "type": "Literal", - "value": "jquery", - }, + "source": null, "specifiers": Array [ Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "$", + "name": "default", "range": Array [ - 7, 8, + 15, ], "type": "Identifier", }, "range": Array [ - 7, 8, + 15, ], - "type": "ImportDefaultSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -85649,7 +115919,7 @@ Object { }, "range": Array [ 0, - 23, + 17, ], "sourceType": "module", "tokens": Array [ @@ -85669,7 +115939,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -85686,57 +115956,69 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "$", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 13, + 8, + 15, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 22, + 15, + 16, ], - "type": "String", - "value": "\\"jquery\\"", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/import-module.src 1`] = ` +exports[`javascript fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { @@ -85746,28 +116028,63 @@ Object { }, "range": Array [ 0, - 13, + 20, ], "source": Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, + "name": "bar", "range": Array [ - 7, - 12, + 16, + 19, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, - "specifiers": Array [], + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + ], "type": "ImportDeclaration", }, ], @@ -85784,7 +116101,7 @@ Object { }, "range": Array [ 0, - 14, + 21, ], "sourceType": "module", "tokens": Array [ @@ -85809,7 +116126,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -85819,25 +116136,61 @@ Object { }, "range": Array [ 7, - 12, + 10, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ - 12, - 13, + 11, + 15, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -85847,13 +116200,16 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-module-specifier.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 31, + "column": 21, "line": 1, }, "start": Object { @@ -85863,30 +116219,29 @@ Object { }, "range": Array [ 0, - 31, + 21, ], "source": Object { "loc": Object { "end": Object { - "column": 30, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 18, "line": 1, }, }, + "name": "bar", "range": Array [ - 25, - 30, + 18, + 21, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, "specifiers": Array [ Object { - "imported": Object { + "exported": Object { "loc": Object { "end": Object { "column": 11, @@ -85897,7 +116252,7 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ 8, 11, @@ -85906,7 +116261,7 @@ Object { }, "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { @@ -85917,29 +116272,29 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "baz", + "name": "foo", "range": Array [ - 15, - 18, + 8, + 11, ], "type": "Identifier", }, "range": Array [ 8, - 18, + 11, ], - "type": "ImportSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "comments": Array [], @@ -85955,7 +116310,7 @@ Object { }, "range": Array [ 0, - 32, + 22, ], "sourceType": "module", "tokens": Array [ @@ -85975,7 +116330,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -86011,58 +116366,22 @@ Object { 11, ], "type": "Identifier", - "value": "bar", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { "column": 12, "line": 1, }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -86070,17 +116389,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 17, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, "range": Array [ - 20, - 24, + 13, + 17, ], "type": "Identifier", "value": "from", @@ -86088,403 +116407,291 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, + "column": 21, "line": 1, }, "start": Object { - "column": 30, + "column": 18, "line": 1, }, }, "range": Array [ - 30, - 31, + 18, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "bar", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/import-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; + +exports[`javascript fixtures/newTarget/invalid-new-target.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ + "declarations": Array [ Object { - "imported": Object { + "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, - "name": "bar", + "name": "x", "range": Array [ - 8, - 11, + 4, + 5, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "init": Object { "loc": Object { "end": Object { "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "baz", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 18, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, + "meta": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - "start": Object { - "column": 20, - "line": 1, + "name": "new", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "name": "target", + "range": Array [ + 12, + 18, + ], + "type": "Identifier", }, - "name": "xyz", "range": Array [ - 20, - 23, + 8, + 18, ], - "type": "Identifier", + "type": "MetaProperty", }, "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 4, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "xyz", - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - }, "range": Array [ - 20, - 23, + 4, + 18, ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "VariableDeclarator", }, - }, - "range": Array [ - 7, - 8, ], - "type": "Punctuator", - "value": "{", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 11, + 0, + 19, ], - "type": "Identifier", - "value": "bar", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 14, + 0, + 3, ], - "type": "Identifier", - "value": "as", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 15, + "column": 4, "line": 1, }, }, "range": Array [ - 15, - 18, + 4, + 5, ], "type": "Identifier", - "value": "baz", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 18, + "column": 6, "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 7, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, "range": Array [ - 20, - 23, + 8, + 11, ], - "type": "Identifier", - "value": "xyz", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 12, "line": 1, }, "start": Object { - "column": 23, + "column": 11, "line": 1, }, }, "range": Array [ - 23, - 24, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, "range": Array [ - 25, - 29, + 12, + 18, ], "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "\\"foo\\"", + "value": "target", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 19, "line": 1, }, "start": Object { - "column": 35, + "column": 18, "line": 1, }, }, "range": Array [ - 35, - 36, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -86494,13 +116701,162 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-named-empty.src 1`] = ` +exports[`javascript fixtures/newTarget/invalid-unknown-property.src 1`] = ` Object { "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "meta": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "new", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "unknown_property", + "range": Array [ + 25, + 41, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 41, + ], + "type": "MetaProperty", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 42, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 44, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 8, + 44, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 44, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 21, + "column": 44, "line": 1, }, "start": Object { @@ -86510,29 +116866,9 @@ Object { }, "range": Array [ 0, - 21, + 44, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [], - "type": "ImportDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], @@ -86548,14 +116884,14 @@ Object { }, "range": Array [ 0, - 22, + 45, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -86565,250 +116901,115 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "import", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 8, + 4, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 9, + 6, + 7, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "from", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 20, + 8, + 16, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ - 20, - 21, + 16, + 17, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/import-named-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "value": "(", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 18, "line": 1, }, "start": Object { - "column": 0, + "column": 17, "line": 1, }, }, "range": Array [ - 0, - 6, + 17, + 18, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 7, + "column": 19, "line": 1, }, }, "range": Array [ - 7, - 8, + 19, + 20, ], "type": "Punctuator", "value": "{", @@ -86816,251 +117017,273 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 24, "line": 1, }, "start": Object { - "column": 8, + "column": 21, "line": 1, }, }, "range": Array [ - 8, - 11, + 21, + 24, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 25, "line": 1, }, "start": Object { - "column": 11, + "column": 24, "line": 1, }, }, "range": Array [ - 11, - 12, + 24, + 25, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 41, "line": 1, }, "start": Object { - "column": 13, + "column": 25, "line": 1, }, }, "range": Array [ - 13, - 17, + 25, + 41, ], "type": "Identifier", - "value": "from", + "value": "unknown_property", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 42, "line": 1, }, "start": Object { - "column": 18, + "column": 41, "line": 1, }, }, "range": Array [ - 18, - 23, + 41, + 42, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 44, "line": 1, }, "start": Object { - "column": 23, + "column": 43, "line": 1, }, }, "range": Array [ - 23, - 24, + 43, + 44, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/import-named-specifiers.src 1`] = ` +exports[`javascript fixtures/newTarget/simple-new-target.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "async": false, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "meta": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "new", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "target", + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + }, + "range": Array [ + 27, + 37, + ], + "type": "MetaProperty", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 23, + 37, + ], + "type": "VariableDeclarator", }, - }, - "name": "bar", - "range": Array [ - 8, - 11, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "kind": "var", "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "bar", "range": Array [ - 8, - 11, + 19, + 38, ], - "type": "Identifier", + "type": "VariableDeclaration", }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "start": Object { + "column": 13, + "line": 1, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + }, + "range": Array [ + 13, + 40, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "range": Array [ - 13, - 16, - ], - "type": "ImportSpecifier", + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "params": Array [], + "range": Array [ + 0, + 40, ], - "type": "ImportDeclaration", + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -87069,14 +117292,14 @@ Object { }, "range": Array [ 0, - 30, + 41, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { @@ -87086,28 +117309,28 @@ Object { }, "range": Array [ 0, - 6, + 8, ], "type": "Keyword", - "value": "import", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 8, + 9, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { @@ -87116,16 +117339,16 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, + 10, 11, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -87143,12 +117366,12 @@ Object { 12, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { @@ -87158,234 +117381,306 @@ Object { }, "range": Array [ 13, - 16, + 14, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 16, - 17, + 19, + 22, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 18, - 22, + 23, + 24, ], "type": "Identifier", - "value": "from", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 23, - 28, + 25, + 26, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 28, - 29, + 27, + 30, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "new", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/import-named-specifiers-comma.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 0, 30, + 31, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, }, - "range": Array [ - 24, - 29, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "target", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, - "local": Object { + "object": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 3, + 5, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "fn", + "range": Array [ + 0, + 2, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, - "name": "bar", "range": Array [ - 8, - 11, + 0, + 6, ], - "type": "Identifier", + "type": "CallExpression", }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { + "property": Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "name": "baz", + "name": "x", "range": Array [ - 13, - 16, + 7, + 8, ], "type": "Identifier", }, + "range": Array [ + 0, + 8, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 14, + ], + "right": Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 13, + "column": 11, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, + "name": "obj", "range": Array [ - 13, - 16, + 11, + 14, ], - "type": "ImportSpecifier", + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 15, ], - "type": "ImportDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], @@ -87401,14 +117696,14 @@ Object { }, "range": Array [ 0, - 31, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { @@ -87418,169 +117713,169 @@ Object { }, "range": Array [ 0, - 6, + 2, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { - "column": 7, + "column": 2, "line": 1, }, }, "range": Array [ - 7, - 8, + 2, + 3, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 11, + 3, + 4, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 12, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 6, "line": 1, }, "start": Object { - "column": 13, + "column": 5, "line": 1, }, }, "range": Array [ - 13, - 16, + 5, + 6, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 17, + 6, + 7, ], "type": "Punctuator", - "value": ",", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 8, "line": 1, }, "start": Object { - "column": 17, + "column": 7, "line": 1, }, }, "range": Array [ - 17, - 18, + 7, + 8, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 10, "line": 1, }, "start": Object { - "column": 19, + "column": 9, "line": 1, }, }, "range": Array [ - 19, - 23, + 9, + 10, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, "range": Array [ - 24, - 29, + 11, + 14, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 1, }, "start": Object { - "column": 29, + "column": 14, "line": 1, }, }, "range": Array [ - 29, - 30, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -87590,503 +117885,515 @@ Object { } `; -exports[`ecmaFeatures fixtures/modules/import-namespace-specifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 1, }, "start": Object { - "column": 12, + "column": 4, "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ - 12, - 15, + 4, + 5, ], "type": "Identifier", }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "operator": "+", + "range": Array [ + 15, + 20, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "BinaryExpression", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 14, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 8, + 28, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ - 7, - 15, + 4, + 28, ], - "type": "ImportNamespaceSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, + "type": "VariableDeclarator", + }, ], - "type": "Punctuator", - "value": "*", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 11, + 0, + 29, ], - "type": "Identifier", - "value": "as", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 15, + 0, + 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 16, + "column": 4, "line": 1, }, }, "range": Array [ - 16, - 20, + 4, + 5, ], "type": "Identifier", - "value": "from", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 7, "line": 1, }, "start": Object { - "column": 21, + "column": 6, "line": 1, }, }, "range": Array [ - 21, - 26, + 6, + 7, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 9, "line": 1, }, "start": Object { - "column": 26, + "column": 8, "line": 1, }, }, "range": Array [ - 26, - 27, + 8, + 9, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/import-null-as-nil.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 0, - 33, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "raw": "\\"bar\\"", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "null", - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "nil", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "range": Array [ - 9, - 20, - ], - "type": "ImportSpecifier", - }, + 14, + 15, ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "[", }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 6, - "line": 1, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 0, - 6, + 15, + 16, ], - "type": "Keyword", - "value": "import", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 1, + "line": 2, }, "start": Object { "column": 7, - "line": 1, + "line": 2, }, }, "range": Array [ - 7, - 8, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { "column": 9, - "line": 1, + "line": 2, }, }, "range": Array [ - 9, - 13, + 19, + 20, ], - "type": "Null", - "value": "null", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 14, - 16, + 20, + 21, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 17, - 20, + 21, + 22, ], - "type": "Identifier", - "value": "nil", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 21, - 22, + 23, + 26, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 23, 27, + 28, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ 28, - 33, + 29, ], - "type": "String", - "value": "\\"bar\\"", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/invalid-await.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "declarations": Array [ + "expression": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ Object { - "id": Object { + "computed": true, + "key": Object { "loc": Object { "end": Object { - "column": 16, + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, "line": 1, }, "start": Object { @@ -88094,14 +118401,14 @@ Object { "line": 1, }, }, - "name": "await", + "name": "y", "range": Array [ 11, - 16, + 12, ], "type": "Identifier", }, - "init": null, + "kind": "init", "loc": Object { "end": Object { "column": 16, @@ -88112,435 +118419,636 @@ Object { "line": 1, }, }, + "method": false, "range": Array [ 11, 16, ], - "type": "VariableDeclarator", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "raw": "20", + "type": "Literal", + "value": 20, + }, }, ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, "range": Array [ - 7, + 1, 17, ], - "type": "VariableDeclaration", + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "[", + }, + Object { "loc": Object { "end": Object { - "column": 17, + "column": 4, "line": 1, }, "start": Object { - "column": 0, + "column": 3, "line": 1, }, }, "range": Array [ - 0, - 17, + 3, + 4, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "x", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, "range": Array [ - 0, - 6, + 4, + 5, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 6, "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, - 10, + 5, + 6, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, "range": Array [ - 11, - 16, + 7, + 9, ], - "type": "Keyword", - "value": "await", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { - "column": 16, + "column": 9, "line": 1, }, }, "range": Array [ - 16, - 17, + 9, + 10, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/invalid-class.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "superClass": null, - "type": "ClassDeclaration", - }, "loc": Object { "end": Object { - "column": 23, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 23, + 11, + 12, ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, - 6, + 12, + 13, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 14, "line": 1, }, }, "range": Array [ - 7, 14, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Numeric", + "value": "20", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, - 20, + 16, + 17, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 22, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { - "column": 22, + "column": 18, "line": 1, }, }, "range": Array [ - 22, - 23, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-named-default.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "expression": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, }, - }, - "range": Array [ - 0, - 16, - ], - "source": null, - "specifiers": Array [ - Object { - "exported": Object { + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "get", "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, - "name": "default", + "method": false, "range": Array [ - 8, - 15, + 2, + 14, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 9, + 14, + ], + "type": "FunctionExpression", }, }, - "local": Object { + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "kind": "set", "loc": Object { "end": Object { - "column": 15, + "column": 29, "line": 1, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, - "name": "default", + "method": false, "range": Array [ - 8, - 15, + 16, + 29, ], - "type": "Identifier", + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 29, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 23, + 29, + ], + "type": "FunctionExpression", + }, }, - "range": Array [ - 8, - 15, - ], - "type": "ExportSpecifier", + ], + "range": Array [ + 1, + 30, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, }, + }, + "range": Array [ + 2, + 5, ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "get", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, "range": Array [ - 0, 6, + 7, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { @@ -88557,13 +119065,13 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { @@ -88573,174 +119081,82 @@ Object { }, "range": Array [ 8, - 15, + 9, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 16, + 9, + 10, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "line": 1, }, }, "range": Array [ - 0, - 20, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, + 10, + 11, ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, - 6, + 12, + 13, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 7, + "column": 13, "line": 1, }, }, "range": Array [ - 7, - 10, + 13, + 14, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -88749,16 +119165,16 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 14, "line": 1, }, }, "range": Array [ - 11, + 14, 15, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -88776,177 +119192,130 @@ Object { 19, ], "type": "Identifier", - "value": "bar", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 21, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-module-specifier.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 21, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, 21, + 22, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", + "start": Object { + "column": 22, + "line": 1, }, + }, + "range": Array [ + 22, + 23, ], - "type": "ExportNamedDeclaration", + "type": "Punctuator", + "value": "]", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "(", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + "value": "v", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 6, + 25, + 26, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 28, "line": 1, }, "start": Object { - "column": 7, + "column": 27, "line": 1, }, }, "range": Array [ - 7, - 8, + 27, + 28, ], "type": "Punctuator", "value": "{", @@ -88954,35 +119323,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 29, "line": 1, }, "start": Object { - "column": 8, + "column": 28, "line": 1, }, }, "range": Array [ - 8, - 11, + 28, + 29, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 30, "line": 1, }, "start": Object { - "column": 11, + "column": 29, "line": 1, }, }, "range": Array [ - 11, - 12, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -88990,59 +119359,45 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 31, "line": 1, }, "start": Object { - "column": 13, + "column": 30, "line": 1, }, }, "range": Array [ - 13, - 17, + 30, + 31, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 32, "line": 1, }, "start": Object { - "column": 18, + "column": 31, "line": 1, }, }, "range": Array [ - 18, - 21, + 31, + 32, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; - -exports[`ecmaFeatures fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; - -exports[`ecmaFeatures fixtures/newTarget/invalid-new-target.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` Object { "body": Array [ Object { @@ -89069,60 +119424,84 @@ Object { "init": Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 8, "line": 1, }, }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 20, + ], + "raw": "\\"hey\\"", + "type": "Literal", + "value": "hey", }, - }, - "name": "new", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, - "start": Object { - "column": 12, - "line": 1, + "method": false, + "range": Array [ + 14, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", }, }, - "name": "target", - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - }, + ], "range": Array [ 8, - 18, + 28, ], - "type": "MetaProperty", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 4, @@ -89131,7 +119510,7 @@ Object { }, "range": Array [ 4, - 18, + 28, ], "type": "VariableDeclarator", }, @@ -89139,8 +119518,8 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -89149,7 +119528,7 @@ Object { }, "range": Array [ 0, - 19, + 29, ], "type": "VariableDeclaration", }, @@ -89158,7 +119537,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -89167,7 +119546,7 @@ Object { }, "range": Array [ 0, - 20, + 30, ], "sourceType": "module", "tokens": Array [ @@ -89228,7 +119607,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { @@ -89238,61 +119617,133 @@ Object { }, "range": Array [ 8, - 11, + 9, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "String", + "value": "\\"hey\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 1, + "line": 2, }, "start": Object { "column": 11, - "line": 1, + "line": 2, }, }, "range": Array [ - 11, - 12, + 21, + 22, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 12, - 18, + 23, + 26, ], "type": "Identifier", - "value": "target", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -89302,7 +119753,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/newTarget/invalid-unknown-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` Object { "body": Array [ Object { @@ -89319,7 +119770,7 @@ Object { "line": 1, }, }, - "name": "f", + "name": "x", "range": Array [ 4, 5, @@ -89327,120 +119778,85 @@ Object { "type": "Identifier", }, "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "new", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, }, - "property": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "unknown_property", - "range": Array [ - 25, - 41, - ], - "type": "Identifier", + "start": Object { + "column": 5, + "line": 2, }, - "range": Array [ - 21, - 41, - ], - "type": "MetaProperty", }, + "name": "bar", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 14, + 24, + ], + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 11, + "line": 2, }, }, + "name": "foo", "range": Array [ 21, - 42, + 24, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, + "type": "Identifier", }, }, - "range": Array [ - 19, - 44, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [], + ], "range": Array [ 8, - 44, + 26, ], - "type": "FunctionExpression", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 4, @@ -89449,7 +119865,7 @@ Object { }, "range": Array [ 4, - 44, + 26, ], "type": "VariableDeclarator", }, @@ -89457,8 +119873,8 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -89467,7 +119883,7 @@ Object { }, "range": Array [ 0, - 44, + 27, ], "type": "VariableDeclaration", }, @@ -89476,7 +119892,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -89485,7 +119901,7 @@ Object { }, "range": Array [ 0, - 45, + 28, ], "sourceType": "module", "tokens": Array [ @@ -89523,7 +119939,7 @@ Object { 5, ], "type": "Identifier", - "value": "f", + "value": "x", }, Object { "loc": Object { @@ -89546,7 +119962,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { @@ -89556,335 +119972,249 @@ Object { }, "range": Array [ 8, - 16, + 9, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 16, - 17, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 17, + 15, 18, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ + 18, 19, - 20, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Keyword", - "value": "new", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 24, - 25, + 19, + 20, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 25, - 41, + 21, + 24, ], "type": "Identifier", - "value": "unknown_property", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 41, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 41, - 42, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 43, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/newTarget/simple-new-target.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "new", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "target", - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - }, - "range": Array [ - 27, - 37, - ], - "type": "MetaProperty", + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; + +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; + +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, + "start": Object { + "column": 3, + "line": 1, }, - "range": Array [ - 23, - 37, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "name": "x", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 1, }, }, + "method": false, "range": Array [ - 19, - 38, + 2, + 9, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, }, - }, - "range": Array [ - 13, - 40, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", "range": Array [ - 9, + 1, 10, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 40, + 12, ], - "type": "FunctionDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -89893,14 +120223,14 @@ Object { }, "range": Array [ 0, - 41, + 13, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -89910,392 +120240,301 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 2, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, "range": Array [ - 9, - 10, + 1, + 2, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 3, "line": 1, }, "start": Object { - "column": 10, + "column": 2, "line": 1, }, }, "range": Array [ - 10, - 11, + 2, + 3, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 4, "line": 1, }, "start": Object { - "column": 11, + "column": 3, "line": 1, }, }, "range": Array [ - 11, - 12, + 3, + 4, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 5, "line": 1, }, "start": Object { - "column": 13, + "column": 4, "line": 1, }, }, "range": Array [ - 13, - 14, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 19, - 22, + 5, + 6, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 23, - 24, + 7, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { "column": 10, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 30, - 31, + 9, + 10, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "target", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 37, - 38, + 10, + 11, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 39, - 40, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", + "expression": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "operator": "+", - "range": Array [ - 15, - 20, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "raw": "5", - "type": "Literal", - "value": 5, + "start": Object { + "column": 3, + "line": 1, }, - "type": "BinaryExpression", }, - "kind": "init", + "range": Array [ + 3, + 6, + ], + "raw": "\\"x\\"", + "type": "Literal", + "value": "x", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "operator": "+", + "range": Array [ + 3, + 12, + ], + "right": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, - "method": false, "range": Array [ - 14, - 26, + 9, + 12, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 23, - 26, - ], - "type": "Identifier", + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", + }, + "type": "BinaryExpression", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 17, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, }, }, - ], - "range": Array [ - 8, - 28, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, + "range": Array [ + 15, + 17, + ], + "raw": "10", + "type": "Literal", + "value": 10, }, }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 18, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { "column": 0, @@ -90304,16 +120543,16 @@ Object { }, "range": Array [ 0, - 29, + 20, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -90322,14 +120561,14 @@ Object { }, "range": Array [ 0, - 30, + 21, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -90339,223 +120578,205 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { - "column": 6, + "column": 2, "line": 1, }, }, "range": Array [ - 6, - 7, + 2, + 3, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 9, + 3, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 14, - 15, + 7, + 8, ], "type": "Punctuator", - "value": "[", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 15, - 16, + 9, + 12, ], - "type": "Numeric", - "value": "5", + "type": "String", + "value": "\\"y\\"", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 17, - 18, + 12, + 13, ], "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Numeric", - "value": "5", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 17, ], - "type": "Punctuator", - "value": ":", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 23, - 26, + 17, + 18, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 28, - 29, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -90565,14 +120786,14 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` Object { "body": Array [ Object { "expression": Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { @@ -90604,7 +120825,7 @@ Object { "kind": "init", "loc": Object { "end": Object { - "column": 9, + "column": 20, "line": 1, }, "start": Object { @@ -90615,98 +120836,61 @@ Object { "method": false, "range": Array [ 2, - 9, + 20, ], "shorthand": false, "type": "Property", "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "range": Array [ + 18, + 20, + ], + "type": "BlockStatement", }, - "name": "y", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 11, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, + "params": Array [], "range": Array [ - 14, - 16, + 7, + 20, ], - "raw": "20", - "type": "Literal", - "value": 20, + "type": "FunctionExpression", }, }, ], "range": Array [ 1, - 17, + 21, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 19, + "column": 23, "line": 1, }, "start": Object { @@ -90716,7 +120900,7 @@ Object { }, "range": Array [ 0, - 19, + 23, ], "type": "ExpressionStatement", }, @@ -90724,8 +120908,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -90734,7 +120918,7 @@ Object { }, "range": Array [ 0, - 19, + 24, ], "sourceType": "module", "tokens": Array [ @@ -90849,7 +121033,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { @@ -90859,97 +121043,97 @@ Object { }, "range": Array [ 7, - 9, + 15, ], - "type": "Numeric", - "value": "10", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 16, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 10, + 15, + 16, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 19, "line": 1, }, "start": Object { - "column": 12, + "column": 18, "line": 1, }, }, "range": Array [ - 12, - 13, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 19, "line": 1, }, }, "range": Array [ - 14, - 16, + 19, + 20, ], - "type": "Numeric", - "value": "20", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, - 17, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -90957,266 +121141,351 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` +Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, "line": 1, }, - }, - "range": Array [ - 17, - 18, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "proto", + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "properties": Array [], + "range": Array [ + 27, + 29, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 19, + 29, + ], + "type": "VariableDeclarator", + }, ], - "type": "Punctuator", - "value": ")", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 15, + 30, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "get", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 5, }, }, - "method": false, + "name": "x", "range": Array [ - 2, - 14, + 36, + 37, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 1, + "line": 6, + }, + }, + "name": "__proto__", + "range": Array [ + 43, + 52, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 6, }, }, + "method": false, "range": Array [ - 12, - 14, + 43, + 59, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 12, + "line": 6, + }, + }, + "name": "proto", + "range": Array [ + 54, + 59, + ], + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 9, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "name": "__proto__", + "range": Array [ + 62, + 71, + ], + "type": "Identifier", }, - }, - "name": "x", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 29, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 7, }, }, + "method": false, "range": Array [ - 27, - 29, + 62, + 78, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "params": Array [ - Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 24, - "line": 1, + "column": 12, + "line": 7, }, }, - "name": "v", + "name": "proto", "range": Array [ - 24, - 25, + 73, + 78, ], "type": "Identifier", }, - ], - "range": Array [ - 23, - 29, - ], - "type": "FunctionExpression", + }, + ], + "range": Array [ + 40, + 80, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 5, }, }, - ], - "range": Array [ - 1, - 30, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 36, + 80, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, 32, + 81, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { "column": 0, @@ -91225,14 +121494,14 @@ Object { }, "range": Array [ 0, - 32, + 81, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 12, "line": 1, }, "start": Object { @@ -91242,349 +121511,349 @@ Object { }, "range": Array [ 0, - 1, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 13, "line": 1, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, "range": Array [ - 1, - 2, + 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 2, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 2, - 5, + 15, + 18, ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 6, - 7, + 19, + 24, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 7, - 8, + 25, + 26, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 8, - 9, + 27, + 28, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 9, - 10, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 10, - 11, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 12, - 13, + 32, + 35, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 13, - 14, + 36, + 37, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 14, - 15, + 38, + 39, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 16, - 19, + 40, + 41, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 6, }, "start": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 20, - 21, + 43, + 52, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 11, + "line": 6, }, "start": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 21, - 22, + 52, + 53, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 22, - 23, + 54, + 59, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 6, }, "start": Object { - "column": 23, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 23, - 24, + 59, + 60, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 24, - 25, + 62, + 71, ], "type": "Identifier", - "value": "v", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 11, + "line": 7, }, "start": Object { - "column": 25, - "line": 1, + "column": 10, + "line": 7, }, }, "range": Array [ - 25, - 26, + 71, + 72, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 27, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 27, - 28, + 73, + 78, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 8, }, "start": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 8, }, }, "range": Array [ - 28, - 29, + 79, + 80, ], "type": "Punctuator", "value": "}", @@ -91592,65 +121861,139 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 8, }, }, "range": Array [ - 29, - 30, + 80, + 81, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 31, + "column": 13, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 13, ], - "type": "Punctuator", - "value": ")", + "type": "ExpressionStatement", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "proto", + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "properties": Array [], + "range": Array [ + 27, + 29, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 19, + 29, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 31, - 32, + 15, + 30, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` -Object { - "body": Array [ Object { "declarations": Array [ Object { @@ -91658,17 +122001,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "name": "x", "range": Array [ - 4, - 5, + 36, + 37, ], "type": "Identifier", }, @@ -91676,145 +122019,347 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "properties": Array [ Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 6, }, }, "range": Array [ - 15, - 20, + 43, + 54, ], - "raw": "\\"hey\\"", + "raw": "\\"__proto__\\"", "type": "Literal", - "value": "hey", + "value": "__proto__", }, "kind": "init", "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 6, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 6, }, }, "method": false, "range": Array [ - 14, - 26, + 43, + 61, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 6, }, "start": Object { - "column": 13, - "line": 2, + "column": 14, + "line": 6, }, }, - "name": "foo", + "name": "proto", "range": Array [ - 23, - 26, + 56, + 61, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "range": Array [ + 64, + 75, + ], + "raw": "\\"__proto__\\"", + "type": "Literal", + "value": "__proto__", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "method": false, + "range": Array [ + 64, + 82, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 14, + "line": 7, + }, + }, + "name": "proto", + "range": Array [ + 77, + 82, ], "type": "Identifier", }, }, ], "range": Array [ - 8, - 28, + 40, + 84, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 28, + 36, + 84, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "var", + "loc": Object { + "end": Object { + "column": 2, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 32, + 85, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 2, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 85, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + "value": "proto", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 2, + "column": 14, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 0, + 28, 29, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + "type": "Punctuator", + "value": "}", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 3, + 32, + 35, ], "type": "Keyword", "value": "var", @@ -91823,16 +122368,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 5, + 36, + 37, ], "type": "Identifier", "value": "x", @@ -91841,16 +122386,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 5, }, "start": Object { "column": 6, - "line": 1, + "line": 5, }, }, "range": Array [ - 6, - 7, + 38, + 39, ], "type": "Punctuator", "value": "=", @@ -91859,16 +122404,16 @@ Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 5, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "range": Array [ - 8, - 9, + 40, + 41, ], "type": "Punctuator", "value": "{", @@ -91876,71 +122421,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 6, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 6, }, }, "range": Array [ - 14, - 15, + 43, + 54, + ], + "type": "String", + "value": "\\"__proto__\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 6, + }, + "start": Object { + "column": 12, + "line": 6, + }, + }, + "range": Array [ + 54, + 55, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 6, }, "start": Object { - "column": 5, - "line": 2, + "column": 14, + "line": 6, }, }, "range": Array [ - 15, - 20, + 56, + 61, ], - "type": "String", - "value": "\\"hey\\"", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 20, + "line": 6, }, "start": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 6, }, }, "range": Array [ - 20, - 21, + 61, + 62, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 7, }, "start": Object { - "column": 11, - "line": 2, + "column": 1, + "line": 7, }, }, "range": Array [ - 21, - 22, + 64, + 75, + ], + "type": "String", + "value": "\\"__proto__\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 7, + }, + "start": Object { + "column": 12, + "line": 7, + }, + }, + "range": Array [ + 75, + 76, ], "type": "Punctuator", "value": ":", @@ -91948,35 +122529,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 7, }, "start": Object { - "column": 13, - "line": 2, + "column": 14, + "line": 7, }, }, "range": Array [ - 23, - 26, + 77, + 82, ], "type": "Identifier", - "value": "foo", + "value": "proto", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "start": Object { "column": 0, - "line": 3, + "line": 8, }, }, "range": Array [ - 27, - 28, + 83, + 84, ], "type": "Punctuator", "value": "}", @@ -91985,16 +122566,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 3, + "line": 8, }, "start": Object { "column": 1, - "line": 3, + "line": 8, }, }, "range": Array [ - 28, - 29, + 84, + 85, ], "type": "Punctuator", "value": ";", @@ -92004,9 +122585,46 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` Object { "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, Object { "declarations": Array [ Object { @@ -92014,17 +122632,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "name": "x", "range": Array [ - 4, - 5, + 19, + 20, ], "type": "Identifier", }, @@ -92032,296 +122650,229 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 8, - "line": 1, + "line": 3, }, }, "properties": Array [ Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 2, + "line": 4, }, "start": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 4, }, }, - "name": "bar", + "name": "y", "range": Array [ - 15, - 18, + 26, + 27, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 11, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 4, }, }, "method": false, "range": Array [ - 14, - 24, + 26, + 36, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 11, + "line": 4, }, "start": Object { - "column": 11, - "line": 2, + "column": 4, + "line": 4, }, }, - "name": "foo", "range": Array [ - 21, - 24, + 29, + 36, + ], + "raw": "'first'", + "type": "Literal", + "value": "first", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "name": "y", + "range": Array [ + 39, + 40, ], "type": "Identifier", }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "method": false, + "range": Array [ + 39, + 50, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 42, + 50, + ], + "raw": "'second'", + "type": "Literal", + "value": "second", + }, }, ], "range": Array [ - 8, - 26, + 23, + 52, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "range": Array [ - 4, - 26, + 19, + 52, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "type": "VariableDeclarator", }, - }, - "range": Array [ - 15, - 18, ], - "type": "Identifier", - "value": "bar", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 2, + "line": 6, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 15, + 53, ], - "type": "Punctuator", - "value": "]", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 2, + "line": 6, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 12, ], - "type": "Punctuator", - "value": ":", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 21, - 24, + 12, + 13, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 3, }, "start": Object { @@ -92330,330 +122881,224 @@ Object { }, }, "range": Array [ - 25, - 26, + 15, + 18, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 3, }, "start": Object { - "column": 1, + "column": 4, "line": 3, }, }, "range": Array [ - 26, - 27, + 19, + 20, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; - -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; - -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 1, - 10, - ], - "type": "ObjectExpression", - }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 0, - 12, + 21, + 22, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "=", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 0, - 1, + 23, + 24, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 2, - "line": 1, + "line": 4, }, "start": Object { "column": 1, - "line": 1, + "line": 4, }, }, "range": Array [ - 1, - 2, + 26, + 27, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 4, }, "start": Object { "column": 2, - "line": 1, + "line": 4, }, }, "range": Array [ - 2, - 3, + 27, + 28, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 11, + "line": 4, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 3, - 4, + 29, + 36, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "'first'", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 4, - "line": 1, + "column": 11, + "line": 4, }, }, "range": Array [ - 4, - 5, + 36, + 37, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 5, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 5, - 6, + 39, + 40, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 7, - 9, + 40, + 41, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 9, - 10, + 42, + 50, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "'second'", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 10, - 11, + 51, + 52, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 11, - 12, + 52, + 53, ], "type": "Punctuator", "value": ";", @@ -92663,147 +123108,244 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 0, "line": 1, }, }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "range": Array [ + 26, + 29, + ], + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 3, - "line": 1, + "column": 1, + "line": 4, }, }, + "method": false, "range": Array [ - 3, - 6, + 26, + 38, ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 31, + 38, + ], + "raw": "\\"first\\"", + "type": "Literal", + "value": "first", }, }, - "operator": "+", - "range": Array [ - 3, - 12, - ], - "right": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 41, + 44, + ], + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 1, + "line": 5, }, }, + "method": false, "range": Array [ - 9, - 12, + 41, + 54, ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "type": "BinaryExpression", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 46, + 54, + ], + "raw": "\\"second\\"", + "type": "Literal", + "value": "second", + }, }, - }, - "method": false, + ], "range": Array [ - 2, - 17, + 23, + 56, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 3, }, }, - ], - "range": Array [ - 1, - 18, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 19, + 56, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 6, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 20, + 15, + 57, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 2, + "line": 6, }, "start": Object { "column": 0, @@ -92812,14 +123354,14 @@ Object { }, "range": Array [ 0, - 21, + 57, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 12, "line": 1, }, "start": Object { @@ -92829,97 +123371,115 @@ Object { }, "range": Array [ 0, - 1, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 13, "line": 1, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, "range": Array [ - 1, - 2, + 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 3, }, "start": Object { - "column": 2, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 2, - 3, + 15, + 18, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 3, - 6, + 19, + 20, ], - "type": "String", - "value": "\\"x\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 7, - 8, + 21, + 22, ], "type": "Punctuator", - "value": "+", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 9, - 12, + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "range": Array [ + 26, + 29, ], "type": "String", "value": "\\"y\\"", @@ -92927,107 +123487,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 12, - 13, + 29, + 30, ], "type": "Punctuator", - "value": "]", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "String", + "value": "\\"first\\"", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 1, + "line": 4, }, "start": Object { "column": 13, - "line": 1, + "line": 4, }, }, "range": Array [ - 13, - 14, + 38, + 39, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 15, - 17, + 41, + 44, ], - "type": "Numeric", - "value": "10", + "type": "String", + "value": "\\"y\\"", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 17, - 18, + 44, + 45, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 18, - 19, + 46, + 54, + ], + "type": "String", + "value": "\\"second\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 55, + 56, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 6, }, "start": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 19, - 20, + 56, + 57, ], "type": "Punctuator", "value": ";", @@ -93037,112 +123633,188 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, - "method": false, + "name": "x", "range": Array [ - 2, - 20, + 4, + 5, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 2, }, }, + "method": true, "range": Array [ - 18, - 20, + 14, + 47, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 37, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 30, + 41, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 47, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 17, + 47, + ], + "type": "FunctionExpression", }, }, - "params": Array [], - "range": Array [ - 7, - 20, - ], - "type": "FunctionExpression", + ], + "range": Array [ + 8, + 49, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 1, - 21, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 4, + 49, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -93151,16 +123823,16 @@ Object { }, "range": Array [ 0, - 23, + 50, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 6, }, "start": Object { "column": 0, @@ -93169,14 +123841,14 @@ Object { }, "range": Array [ 0, - 24, + 51, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -93186,205 +123858,205 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 3, + 6, + 7, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 9, "line": 1, }, "start": Object { - "column": 3, + "column": 8, "line": 1, }, }, "range": Array [ - 3, - 4, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, "range": Array [ - 4, - 5, + 14, + 17, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 5, - 6, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 7, - 15, + 18, + 19, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 15, - 16, + 20, + 21, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 16, - 17, + 30, + 36, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 18, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 3, }, }, "range": Array [ - 18, - 19, + 37, + 40, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 19, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 18, + "line": 3, }, }, "range": Array [ - 19, - 20, + 40, + 41, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 20, - 21, + 46, + 47, ], "type": "Punctuator", "value": "}", @@ -93392,35 +124064,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 21, - 22, + 48, + 49, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 22, - 23, + 49, + 50, ], "type": "Punctuator", "value": ";", @@ -93430,313 +124102,183 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` Object { "body": Array [ Object { - "directive": "use strict", "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 28, ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "proto", - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, + "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "line": 1, }, - "name": "x", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "name": "__proto__", - "range": Array [ - 43, - 52, - ], - "type": "Identifier", - }, - "kind": "init", + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 10, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "method", "range": Array [ - 43, - 59, + 10, + 16, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "name": "proto", - "range": Array [ - 54, - 59, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "name": "__proto__", - "range": Array [ - 62, - 71, - ], - "type": "Identifier", + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, + "start": Object { + "column": 4, + "line": 2, }, - "method": false, - "range": Array [ - 62, - 78, - ], - "shorthand": false, - "type": "Property", - "value": Object { + }, + "method": true, + "range": Array [ + 10, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 12, - "line": 7, + "column": 13, + "line": 2, }, }, - "name": "proto", "range": Array [ - 73, - 78, + 19, + 26, ], - "type": "Identifier", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 2, + }, }, + "params": Array [], + "range": Array [ + 16, + 26, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 40, - 80, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 5, }, - }, + ], "range": Array [ - 36, - 80, + 4, + 28, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 81, + 0, + 29, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 8, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -93745,14 +124287,14 @@ Object { }, "range": Array [ 0, - 81, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -93762,349 +124304,543 @@ Object { }, "range": Array [ 0, - 12, + 1, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, - 13, + 2, + 3, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 1, }, }, "range": Array [ - 15, - 18, + 4, + 5, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 19, - 24, + 10, + 16, ], "type": "Identifier", - "value": "proto", + "value": "method", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 3, + "line": 2, }, "start": Object { "column": 10, - "line": 3, + "line": 2, }, }, "range": Array [ - 25, - 26, + 16, + 17, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 12, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 11, + "line": 2, }, }, "range": Array [ - 27, - 28, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 3, + "line": 2, }, "start": Object { "column": 13, - "line": 3, + "line": 2, }, }, "range": Array [ - 28, - 29, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 3, }, "start": Object { - "column": 14, + "column": 4, "line": 3, }, }, "range": Array [ - 29, - 30, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 32, - 35, + 27, + 28, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 2, + "line": 4, }, "start": Object { - "column": 4, - "line": 5, + "column": 1, + "line": 4, }, }, "range": Array [ - 36, - 37, + 28, + 29, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 3, + "line": 4, }, "start": Object { - "column": 6, - "line": 5, + "column": 2, + "line": 4, }, }, "range": Array [ - 38, - 39, + 29, + 30, ], "type": "Punctuator", - "value": "=", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 10, + 23, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 13, + 23, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 4, + 25, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 2, + "line": 4, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 40, - 41, + 0, + 26, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { "column": 1, - "line": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, }, "range": Array [ - 43, - 52, + 0, + 1, ], "type": "Identifier", - "value": "__proto__", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 10, - "line": 6, + "column": 2, + "line": 1, }, }, "range": Array [ - 52, - 53, + 2, + 3, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 54, - 59, + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 10, + 13, ], "type": "Identifier", - "value": "proto", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 6, + "column": 8, + "line": 2, }, "start": Object { - "column": 17, - "line": 6, + "column": 7, + "line": 2, }, }, "range": Array [ - 59, - 60, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 7, + "column": 8, + "line": 2, }, }, "range": Array [ - 62, - 71, + 14, + 15, ], - "type": "Identifier", - "value": "__proto__", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 7, + "line": 2, }, "start": Object { "column": 10, - "line": 7, + "line": 2, }, }, "range": Array [ - 71, - 72, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 3, }, }, "range": Array [ - 73, - 78, + 22, + 23, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 4, }, "start": Object { "column": 0, - "line": 8, + "line": 4, }, }, "range": Array [ - 79, - 80, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -94113,16 +124849,34 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 4, }, "start": Object { "column": 1, - "line": 8, + "line": 4, }, }, "range": Array [ - 80, - 81, + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -94132,315 +124886,183 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` Object { "body": Array [ Object { - "directive": "use strict", "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 25, ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "proto", - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, + "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "line": 1, }, - "name": "x", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 43, - 54, - ], - "raw": "\\"__proto__\\"", - "type": "Literal", - "value": "__proto__", - }, - "kind": "init", + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 7, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "set", "range": Array [ - 43, - 61, + 10, + 13, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "name": "proto", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "method": true, + "range": Array [ + 10, + 23, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 7, + "column": 10, + "line": 2, }, }, "range": Array [ - 64, - 75, + 16, + 23, ], - "raw": "\\"__proto__\\"", - "type": "Literal", - "value": "__proto__", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 7, + "column": 7, + "line": 2, }, }, - "method": false, + "params": Array [], "range": Array [ - 64, - 82, + 13, + 23, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "name": "proto", - "range": Array [ - 77, - 82, - ], - "type": "Identifier", - }, + "type": "FunctionExpression", }, - ], - "range": Array [ - 40, - 84, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, }, - "start": Object { - "column": 4, - "line": 5, - }, - }, + ], "range": Array [ - 36, - 84, + 4, + 25, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 85, + 0, + 26, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 8, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -94449,14 +125071,14 @@ Object { }, "range": Array [ 0, - 85, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -94466,51 +125088,123 @@ Object { }, "range": Array [ 0, - 12, + 1, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, + 2, + 3, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ 13, + 14, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 9, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 8, + "line": 2, }, }, "range": Array [ + 14, 15, - 18, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, "line": 3, }, "start": Object { @@ -94519,83 +125213,243 @@ Object { }, }, "range": Array [ - 19, - 24, - ], - "type": "Identifier", - "value": "proto", + 22, + 23, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 10, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 2, + "line": 4, }, "start": Object { - "column": 12, - "line": 3, + "column": 1, + "line": 4, }, }, "range": Array [ - 27, - 28, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 3, + "line": 4, }, "start": Object { - "column": 13, - "line": 3, + "column": 2, + "line": 4, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 33, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "method", + "range": Array [ + 10, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 10, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 23, + 31, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 17, + 21, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 16, + 31, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 4, + 33, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 2, + "line": 5, }, "start": Object { - "column": 14, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 34, ], - "type": "Punctuator", - "value": ";", + "type": "ExpressionStatement", }, Object { "loc": Object { @@ -94604,31 +125458,48 @@ Object { "line": 5, }, "start": Object { - "column": 0, + "column": 2, "line": 5, }, }, "range": Array [ - 32, + 34, 35, ], - "type": "Keyword", - "value": "var", + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 5, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 35, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 1, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 1, ], "type": "Identifier", "value": "x", @@ -94636,17 +125507,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 3, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 2, + "line": 1, }, }, "range": Array [ - 38, - 39, + 2, + 3, ], "type": "Punctuator", "value": "=", @@ -94654,17 +125525,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 4, + "line": 1, }, }, "range": Array [ - 40, - 41, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -94672,161 +125543,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 10, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 43, - 54, + 10, + 16, ], - "type": "String", - "value": "\\"__proto__\\"", + "type": "Identifier", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 11, + "line": 2, }, "start": Object { - "column": 12, - "line": 6, + "column": 10, + "line": 2, }, }, "range": Array [ - 54, - 55, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 15, + "line": 2, }, "start": Object { - "column": 14, - "line": 6, + "column": 11, + "line": 2, }, }, "range": Array [ - 56, - 61, + 17, + 21, ], "type": "Identifier", - "value": "proto", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 16, + "line": 2, }, "start": Object { - "column": 19, - "line": 6, + "column": 15, + "line": 2, }, }, "range": Array [ - 61, - 62, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 18, + "line": 2, }, "start": Object { - "column": 1, - "line": 7, + "column": 17, + "line": 2, }, }, "range": Array [ - 64, - 75, + 23, + 24, ], - "type": "String", - "value": "\\"__proto__\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 5, + "line": 4, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 4, }, }, "range": Array [ - 75, - 76, + 30, + 31, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 1, + "line": 5, }, "start": Object { - "column": 14, - "line": 7, + "column": 0, + "line": 5, }, }, "range": Array [ - 77, - 82, + 32, + 33, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 8, + "column": 2, + "line": 5, }, "start": Object { - "column": 0, - "line": 8, + "column": 1, + "line": 5, }, }, "range": Array [ - 83, - 84, + 33, + 34, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 8, + "column": 3, + "line": 5, }, "start": Object { - "column": 1, - "line": 8, + "column": 2, + "line": 5, }, }, "range": Array [ - 84, - 85, + 34, + 35, ], "type": "Punctuator", "value": ";", @@ -94836,242 +125707,184 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` Object { "body": Array [ Object { - "directive": "use strict", "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 30, ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "y", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "kind": "init", + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 11, - "line": 4, + "column": 12, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, - "method": false, "range": Array [ - 26, - 36, + 10, + 18, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 29, - 36, - ], - "raw": "'first'", - "type": "Literal", - "value": "first", + "raw": "\\"method\\"", + "type": "Literal", + "value": "method", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "method": true, + "range": Array [ + 10, + 28, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 15, + "line": 2, }, }, - "name": "y", "range": Array [ - 39, - 40, + 21, + 28, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 12, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 2, }, }, - "method": false, + "params": Array [], "range": Array [ - 39, - 50, + 18, + 28, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 42, - 50, - ], - "raw": "'second'", - "type": "Literal", - "value": "second", - }, + "type": "FunctionExpression", }, - ], - "range": Array [ - 23, - 52, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 3, }, - }, + ], "range": Array [ - 19, - 52, + 4, + 30, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 15, - 53, + 0, + 31, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -95080,14 +125893,14 @@ Object { }, "range": Array [ 0, - 53, + 32, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -95097,128 +125910,128 @@ Object { }, "range": Array [ 0, - 12, + 1, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, - 13, + 2, + 3, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 1, }, }, "range": Array [ - 15, - 18, + 4, + 5, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 12, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 19, - 20, + 10, + 18, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"method\\"", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 2, }, "start": Object { - "column": 6, - "line": 3, + "column": 12, + "line": 2, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 14, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 13, + "line": 2, }, }, "range": Array [ - 23, - 24, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 16, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 2, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 5, + "line": 3, }, "start": Object { - "column": 2, - "line": 4, + "column": 4, + "line": 3, }, }, "range": Array [ @@ -95226,130 +126039,58 @@ Object { 28, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 1, "line": 4, }, "start": Object { - "column": 4, + "column": 0, "line": 4, }, }, "range": Array [ 29, - 36, - ], - "type": "String", - "value": "'first'", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 36, - 37, + 30, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 4, }, "start": Object { "column": 1, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, + "line": 4, }, }, "range": Array [ - 40, - 41, + 30, + 31, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "String", - "value": "'second'", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, + "line": 4, }, }, "range": Array [ - 52, - 53, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -95359,217 +126100,178 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` Object { "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, Object { "declarations": Array [ Object { "id": Object { "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 26, - 29, - ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "method": false, - "range": Array [ - 26, - 38, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 31, - 38, - ], - "raw": "\\"first\\"", - "type": "Literal", - "value": "first", - }, + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, }, + }, + "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 41, - 44, + 14, + 19, ], - "raw": "\\"y\\"", + "raw": "\\"foo\\"", "type": "Literal", - "value": "y", + "value": "foo", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { - "column": 1, - "line": 5, + "column": 4, + "line": 2, }, }, - "method": false, + "method": true, "range": Array [ - 41, - 54, + 14, + 49, ], "shorthand": false, "type": "Property", "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 32, + 43, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 49, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { - "column": 6, - "line": 5, + "column": 9, + "line": 2, }, }, + "params": Array [], "range": Array [ - 46, - 54, + 19, + 49, ], - "raw": "\\"second\\"", - "type": "Literal", - "value": "second", + "type": "FunctionExpression", }, }, ], "range": Array [ - 23, - 56, + 8, + 51, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 19, - 56, + 4, + 51, ], "type": "VariableDeclarator", }, @@ -95578,16 +126280,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 15, - 57, + 0, + 52, ], "type": "VariableDeclaration", }, @@ -95595,7 +126297,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 2, + "column": 0, "line": 6, }, "start": Object { @@ -95605,14 +126307,14 @@ Object { }, "range": Array [ 0, - 57, + 53, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 3, "line": 1, }, "start": Object { @@ -95622,43 +126324,7 @@ Object { }, "range": Array [ 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, + 3, ], "type": "Keyword", "value": "var", @@ -95667,16 +126333,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Identifier", "value": "x", @@ -95685,16 +126351,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 3, + "line": 1, }, "start": Object { "column": 6, - "line": 3, + "line": 1, }, }, "range": Array [ - 21, - 22, + 6, + 7, ], "type": "Punctuator", "value": "=", @@ -95703,16 +126369,16 @@ Object { "loc": Object { "end": Object { "column": 9, - "line": 3, + "line": 1, }, "start": Object { "column": 8, - "line": 3, + "line": 1, }, }, "range": Array [ - 23, - 24, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -95720,143 +126386,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 4, - "line": 4, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, "range": Array [ - 26, - 29, + 14, + 19, ], "type": "String", - "value": "\\"y\\"", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 10, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 9, + "line": 2, }, }, "range": Array [ - 29, - 30, + 19, + 20, ], "type": "Punctuator", - "value": ":", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 4, + "line": 2, }, "start": Object { - "column": 6, - "line": 4, + "column": 12, + "line": 2, }, }, "range": Array [ - 31, - 38, + 22, + 23, ], - "type": "String", - "value": "\\"first\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 4, + "line": 3, }, "start": Object { - "column": 13, - "line": 4, + "column": 8, + "line": 3, }, }, "range": Array [ + 32, 38, - 39, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 18, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 15, + "line": 3, }, }, "range": Array [ - 41, - 44, + 39, + 42, ], - "type": "String", - "value": "\\"y\\"", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 19, + "line": 3, }, "start": Object { - "column": 4, - "line": 5, + "column": 18, + "line": 3, }, }, "range": Array [ - 44, - 45, + 42, + 43, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { - "column": 6, - "line": 5, + "column": 4, + "line": 4, }, }, "range": Array [ - 46, - 54, + 48, + 49, ], - "type": "String", - "value": "\\"second\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 0, - "line": 6, + "line": 5, }, }, "range": Array [ - 55, - 56, + 50, + 51, ], "type": "Punctuator", "value": "}", @@ -95865,16 +126549,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 5, }, "start": Object { "column": 1, - "line": 6, + "line": 5, }, }, "range": Array [ - 56, - 57, + 51, + 52, ], "type": "Punctuator", "value": ";", @@ -95884,9 +126568,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; - -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { @@ -95895,7 +126577,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -95903,10 +126585,138 @@ Object { "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ 4, - 5, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 32, + 33, ], "type": "Identifier", }, @@ -95914,149 +126724,205 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 8, - "line": 1, + "line": 5, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "method": false, + "range": Array [ + 42, + 45, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, }, - }, - "properties": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { "column": 7, - "line": 2, + "line": 7, }, "start": Object { "column": 4, - "line": 2, + "line": 7, }, }, - "name": "foo", + "name": "get", "range": Array [ - 14, - 17, + 51, + 54, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 7, }, "start": Object { "column": 4, - "line": 2, + "line": 7, }, }, - "method": true, + "method": false, "range": Array [ - 14, - 47, + 51, + 54, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 41, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, }, - "range": Array [ - 20, - 47, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 8, }, "start": Object { + "column": 4, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 60, + 63, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "method": false, + "range": Array [ + 60, + 63, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { "column": 7, - "line": 2, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, }, }, - "params": Array [], + "name": "set", "range": Array [ - 17, - 47, + 60, + 63, ], - "type": "FunctionExpression", + "type": "Identifier", }, }, ], "range": Array [ - 8, - 49, + 36, + 65, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 49, + 32, + 65, ], "type": "VariableDeclarator", }, @@ -96065,16 +126931,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 50, + 28, + 66, ], "type": "VariableDeclaration", }, @@ -96083,7 +126949,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 10, }, "start": Object { "column": 0, @@ -96092,7 +126958,7 @@ Object { }, "range": Array [ 0, - 51, + 67, ], "sourceType": "module", "tokens": Array [ @@ -96117,7 +126983,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -96127,46 +126993,28 @@ Object { }, "range": Array [ 4, - 5, + 7, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ 8, - 9, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { @@ -96180,11 +127028,11 @@ Object { }, }, "range": Array [ - 14, - 17, + 13, + 16, ], "type": "Identifier", - "value": "foo", + "value": "get", }, Object { "loc": Object { @@ -96198,544 +127046,513 @@ Object { }, }, "range": Array [ + 16, 17, - 18, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 18, - 19, + 22, + 25, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 20, - 21, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 3, + "line": 5, }, "start": Object { - "column": 8, - "line": 3, + "column": 0, + "line": 5, }, }, "range": Array [ - 30, - 36, + 28, + 31, ], "type": "Keyword", - "value": "return", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 5, + "line": 5, }, "start": Object { - "column": 15, - "line": 3, + "column": 4, + "line": 5, }, }, "range": Array [ - 37, - 40, + 32, + 33, ], "type": "Identifier", - "value": "bar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 7, + "line": 5, }, "start": Object { - "column": 18, - "line": 3, + "column": 6, + "line": 5, }, }, "range": Array [ - 40, - 41, + 34, + 35, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 9, + "line": 5, }, "start": Object { - "column": 4, - "line": 4, + "column": 8, + "line": 5, }, }, "range": Array [ - 46, - 47, + 36, + 37, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 7, + "line": 6, }, "start": Object { - "column": 0, - "line": 5, + "column": 4, + "line": 6, }, }, "range": Array [ - 48, - 49, + 42, + 45, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 8, + "line": 6, }, "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 16, - 26, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 4, - 28, - ], - "type": "ObjectExpression", + "column": 7, + "line": 6, }, - "type": "AssignmentExpression", }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 7, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 0, - 29, + 51, + 54, ], - "type": "ExpressionStatement", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 8, + "line": 7, }, "start": Object { - "column": 2, - "line": 4, + "column": 7, + "line": 7, }, }, "range": Array [ - 29, - 30, + 54, + 55, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, + "type": "Punctuator", + "value": ",", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 60, + 63, + ], + "type": "Identifier", + "value": "set", }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 1, - "line": 1, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 9, }, }, "range": Array [ - 0, - 1, + 64, + 65, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 2, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 2, - 3, + 65, + 66, ], "type": "Punctuator", - "value": "=", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/octalLiterals/lowercase.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "raw": "0o717", + "type": "Literal", + "value": 463, + }, "loc": Object { "end": Object { - "column": 5, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, "range": Array [ - 4, - 5, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 7, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 10, - 16, + 0, + 5, ], - "type": "Identifier", - "value": "method", + "type": "Numeric", + "value": "0o717", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 16, - 17, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/octalLiterals/strict-uppercase.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 13, ], - "type": "Punctuator", - "value": ")", + "type": "ExpressionStatement", }, Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 14, + 19, + ], + "raw": "0O717", + "type": "Literal", + "value": 463, + }, "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 2, }, "start": Object { - "column": 13, + "column": 0, "line": 2, }, }, "range": Array [ - 19, + 14, 20, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 13, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 12, + "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 5, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 2, }, }, "range": Array [ - 28, - 29, + 14, + 19, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "0O717", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 6, + "line": 2, }, "start": Object { - "column": 2, - "line": 4, + "column": 5, + "line": 2, }, }, "range": Array [ - 29, - 30, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -96745,183 +127562,191 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` +exports[`javascript fixtures/octalLiterals/uppercase.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "operator": "=", "range": Array [ 0, - 25, + 5, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 4, - 25, - ], - "type": "ObjectExpression", + "raw": "0O717", + "type": "Literal", + "value": 463, + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "type": "AssignmentExpression", }, + "range": Array [ + 0, + 5, + ], + "type": "Numeric", + "value": "0O717", + }, + Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { - "column": 0, + "column": 5, "line": 1, }, }, "range": Array [ - 0, - 26, + 5, + 6, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/regex/regexp-simple.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "raw": "/foo./", + "regex": Object { + "flags": "", + "pattern": "foo.", + }, + "type": "Literal", + "value": Object {}, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 26, - 27, + 0, + 17, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -96930,14 +127755,14 @@ Object { }, "range": Array [ 0, - 27, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -96947,187 +127772,281 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, "range": Array [ - 2, - 3, + 4, + 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, - 5, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ 10, - 13, + 16, ], - "type": "Identifier", - "value": "get", + "regex": Object { + "flags": "", + "pattern": "foo.", + }, + "type": "RegularExpression", + "value": "/foo./", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 17, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 40, + ], + "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "regex": Object { + "flags": "u", + "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", + }, + "type": "Literal", + "value": Object {}, + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 40, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 41, ], - "type": "Punctuator", - "value": ")", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 22, - 23, + 4, + 5, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 25, - 26, + 8, + 40, ], - "type": "Punctuator", - "value": ";", + "regex": Object { + "flags": "u", + "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", + }, + "type": "RegularExpression", + "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 41, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 40, + "line": 1, }, }, "range": Array [ - 26, - 27, + 40, + 41, ], "type": "Punctuator", "value": ";", @@ -97137,183 +128056,93 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 21, + ], + "raw": "/\\\\u{110000}/u", + "regex": Object { + "flags": "u", + "pattern": "\\\\u{110000}", + }, + "type": "Literal", + "value": null, }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { "column": 4, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "set", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "type": "FunctionExpression", - }, - }, - ], "range": Array [ 4, - 25, + 21, ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, + "type": "VariableDeclarator", + }, ], - "type": "ExpressionStatement", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 26, - 27, + 0, + 22, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -97322,14 +128151,14 @@ Object { }, "range": Array [ 0, - 27, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -97339,28 +128168,10 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, 3, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { @@ -97377,149 +128188,63 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 13, - ], "type": "Identifier", - "value": "set", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 13, - 14, + 6, + 7, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { "column": 8, - "line": 2, + "line": 1, }, }, "range": Array [ - 14, - 15, + 8, + 21, ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "regex": Object { + "flags": "u", + "pattern": "\\\\u{110000}", }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", + "type": "RegularExpression", + "value": "/\\\\u{110000}/u", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ + 21, 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, ], "type": "Punctuator", "value": ";", @@ -97529,167 +128254,75 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-simple.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "raw": "/foo/u", + "regex": Object { + "flags": "u", + "pattern": "foo", + }, + "type": "Literal", + "value": Object {}, }, - }, - "operator": "=", - "range": Array [ - 0, - 33, - ], - "right": Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { "column": 4, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "test", - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 16, - 31, - ], - "type": "FunctionExpression", - }, - }, - ], "range": Array [ 4, - 33, + 16, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -97698,33 +128331,16 @@ Object { }, "range": Array [ 0, - 34, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, + 17, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -97733,14 +128349,14 @@ Object { }, "range": Array [ 0, - 35, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -97750,25 +128366,43 @@ Object { }, "range": Array [ 0, - 1, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 2, + "column": 8, "line": 1, }, }, "range": Array [ - 2, - 3, + 8, + 9, ], "type": "Punctuator", "value": "=", @@ -97776,179 +128410,237 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 16, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 16, ], - "type": "Punctuator", - "value": "{", + "regex": Object { + "flags": "u", + "pattern": "foo", + }, + "type": "RegularExpression", + "value": "/foo/u", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/regexYFlag/regexp-y-simple.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "raw": "/foo/y", + "regex": Object { + "flags": "y", + "pattern": "foo", + }, + "type": "Literal", + "value": Object {}, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 10, - 16, ], - "type": "Identifier", - "value": "method", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 16, + 0, 17, ], - "type": "Punctuator", - "value": "(", + "type": "VariableDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "test", + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 4, + "line": 1, }, }, "range": Array [ - 30, - 31, + 4, + 7, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 8, + "line": 1, }, }, "range": Array [ - 32, - 33, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 33, - 34, + 10, + 16, ], - "type": "Punctuator", - "value": ";", + "regex": Object { + "flags": "y", + "pattern": "foo", + }, + "type": "RegularExpression", + "value": "/foo/y", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 34, - 35, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -97958,175 +128650,134 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` +exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "operator": "=", + "name": "f", "range": Array [ - 0, - 30, + 9, + 10, ], - "right": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 18, - ], - "raw": "\\"method\\"", - "type": "Literal", - "value": "method", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, }, - "method": true, - "range": Array [ - 10, - 28, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 28, - ], - "type": "FunctionExpression", + "start": Object { + "column": 17, + "line": 1, }, }, - ], + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, "range": Array [ - 4, - 30, + 14, + 18, ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "RestElement", }, - }, + ], "range": Array [ 0, - 31, + 22, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 31, - 32, + 22, + 23, ], "type": "EmptyStatement", }, @@ -98134,8 +128785,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -98144,14 +128795,14 @@ Object { }, "range": Array [ 0, - 32, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -98161,187 +128812,187 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 10, "line": 1, }, "start": Object { - "column": 2, + "column": 9, "line": 1, }, }, "range": Array [ - 2, - 3, + 9, + 10, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 10, - 18, + 11, + 12, ], - "type": "String", - "value": "\\"method\\"", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 2, + "line": 1, }, "start": Object { "column": 12, - "line": 2, + "line": 1, }, }, "range": Array [ - 18, - 19, + 12, + 13, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 19, - 20, + 14, + 17, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 21, - 22, + 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 20, + "line": 1, }, }, "range": Array [ - 29, - 30, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 30, - 31, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 31, - 32, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -98351,187 +129002,165 @@ Object { } `; -exports[`ecmaFeatures fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` +exports[`javascript fixtures/restParams/class-constructor.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "constructor", "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "name": "x", "range": Array [ - 4, - 5, + 14, + 41, ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "kind": "init", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 3, }, "start": Object { - "column": 4, + "column": 24, "line": 2, }, }, - "method": true, "range": Array [ - 14, - 49, + 34, + 41, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 32, - 43, - ], - "type": "ReturnStatement", - }, - ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 2, }, "start": Object { - "column": 12, + "column": 19, "line": 2, }, }, + "name": "foo", "range": Array [ - 22, - 49, + 29, + 32, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 2, }, "start": Object { - "column": 9, + "column": 16, "line": 2, }, }, - "params": Array [], "range": Array [ - 19, - 49, + 26, + 32, ], - "type": "FunctionExpression", + "type": "RestElement", }, - }, - ], - "range": Array [ - 8, - 51, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, + ], + "range": Array [ + 25, + 41, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 51, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "kind": "var", + "range": Array [ + 8, + 43, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -98540,16 +129169,17 @@ Object { }, "range": Array [ 0, - 52, + 43, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -98558,14 +129188,14 @@ Object { }, "range": Array [ 0, - 53, + 44, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -98575,28 +129205,10 @@ Object { }, "range": Array [ 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, 5, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { @@ -98613,8 +129225,8 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { @@ -98637,7 +129249,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 2, }, "start": Object { @@ -98647,25 +129259,25 @@ Object { }, "range": Array [ 14, - 19, + 25, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 16, "line": 2, }, "start": Object { - "column": 9, + "column": 15, "line": 2, }, }, "range": Array [ - 19, - 20, + 25, + 26, ], "type": "Punctuator", "value": "(", @@ -98673,534 +129285,294 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 2, }, "start": Object { - "column": 10, + "column": 16, "line": 2, }, }, "range": Array [ - 20, - 21, + 26, + 29, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 22, "line": 2, }, "start": Object { - "column": 12, + "column": 19, "line": 2, }, }, "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ + 29, 32, - 38, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 39, - 42, ], "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", + "column": 23, + "line": 2, }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", + "start": Object { + "column": 22, + "line": 2, }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, }, + }, + "range": Array [ + 34, + 35, ], - "kind": "var", + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, "line": 3, }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 26, + 42, + 43, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/restParams/class-method.src 1`] = ` +Object { + "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 5, + "line": 2, }, }, - "name": "x", "range": Array [ - 32, + 14, 33, ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 5, + "line": 3, }, "start": Object { - "column": 4, - "line": 6, + "column": 16, + "line": 2, }, }, - "method": false, "range": Array [ - 42, - 45, + 26, + 33, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "method": false, - "range": Array [ - 51, - 54, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, }, + "name": "bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", }, - "name": "set", - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "method": false, - "range": Array [ - 60, - 63, - ], - "shorthand": true, - "type": "Property", - "value": Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 14, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 8, + "line": 2, }, }, - "name": "set", "range": Array [ - 60, - 63, + 18, + 24, ], - "type": "Identifier", + "type": "RestElement", }, - }, - ], - "range": Array [ - 36, - 65, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, + ], + "range": Array [ + 17, + 33, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 32, - 65, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "kind": "var", + "range": Array [ + 8, + 35, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 66, + 0, + 35, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 5, }, "start": Object { "column": 0, @@ -99209,14 +129581,14 @@ Object { }, "range": Array [ 0, - 67, + 36, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -99226,10 +129598,10 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "var", + "value": "class", }, Object { "loc": Object { @@ -99238,75 +129610,147 @@ Object { "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, + 6, 7, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 2, }, "start": Object { - "column": 4, + "column": 14, "line": 2, }, }, "range": Array [ - 13, - 16, + 24, + 25, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 2, }, "start": Object { - "column": 7, + "column": 16, "line": 2, }, }, "range": Array [ - 16, - 17, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 3, }, "start": Object { @@ -99315,134 +129759,235 @@ Object { }, }, "range": Array [ - 22, - 25, + 32, + 33, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 7, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ - 25, - 26, + 34, + 35, ], "type": "Punctuator", - "value": ";", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/restParams/error-no-default.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 22, + ], + "type": "RestElement", + }, + ], "range": Array [ - 28, - 31, + 0, + 24, ], - "type": "Keyword", - "value": "var", + "type": "TSDeclareFunction", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 32, - 33, + 0, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 10, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 9, + "line": 1, }, }, "range": Array [ - 34, - 35, + 9, + 10, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 36, - 37, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 11, + "line": 1, }, }, "range": Array [ - 42, - 45, + 11, + 12, ], "type": "Identifier", - "value": "foo", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 12, + "line": 1, }, }, "range": Array [ - 45, - 46, + 12, + 13, ], "type": "Punctuator", "value": ",", @@ -99450,89 +129995,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 51, - 54, + 14, + 17, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Identifier", - "value": "get", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 20, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 19, + "line": 1, }, }, "range": Array [ - 54, - 55, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 21, + "line": 1, }, }, "range": Array [ - 60, - 63, + 21, + 22, ], - "type": "Identifier", - "value": "set", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 22, + "line": 1, }, }, "range": Array [ - 64, - 65, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 24, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 23, + "line": 1, }, }, "range": Array [ - 65, - 66, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -99542,34 +130105,34 @@ Object { } `; -exports[`ecmaFeatures fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; - -exports[`ecmaFeatures fixtures/octalLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/restParams/error-not-last.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, + "name": "f", "range": Array [ - 0, - 5, + 9, + 10, ], - "raw": "0o717", - "type": "Literal", - "value": 463, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { @@ -99577,18 +130140,91 @@ Object { "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "RestElement", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + ], "range": Array [ 0, - 6, + 23, ], - "type": "ExpressionStatement", + "type": "TSDeclareFunction", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -99597,14 +130233,14 @@ Object { }, "range": Array [ 0, - 7, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -99614,128 +130250,47 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Numeric", - "value": "0o717", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, + 8, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "function", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/octalLiterals/strict-uppercase.src 1`] = ` -Object { - "body": Array [ Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 13, + 9, + 10, ], - "type": "ExpressionStatement", + "type": "Identifier", + "value": "f", }, Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "0O717", - "type": "Literal", - "value": 463, - }, "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 20, + 10, + 11, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { @@ -99743,16 +130298,16 @@ Object { "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, + 11, 12, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -99770,138 +130325,112 @@ Object { 13, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ 14, - 19, + 17, ], - "type": "Numeric", - "value": "0O717", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 19, - 20, + 17, + 18, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "b", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/octalLiterals/uppercase.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, - "range": Array [ - 0, - 5, - ], - "raw": "0O717", - "type": "Literal", - "value": 463, }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 6, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, - 6, + 20, + 21, ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "c", }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 5, + 21, + 22, ], - "type": "Numeric", - "value": "0O717", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { - "column": 5, + "column": 22, "line": 1, }, }, "range": Array [ - 5, - 6, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -99911,7 +130440,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/regex/regexp-simple.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression.src 1`] = ` Object { "body": Array [ Object { @@ -99920,7 +130449,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -99928,39 +130457,92 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ 4, - 7, + 5, ], "type": "Identifier", }, "init": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "RestElement", + }, + ], "range": Array [ - 10, - 16, + 8, + 26, ], - "raw": "/foo./", - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "Literal", - "value": Object {}, + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { @@ -99970,7 +130552,7 @@ Object { }, "range": Array [ 4, - 16, + 26, ], "type": "VariableDeclarator", }, @@ -99978,7 +130560,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { @@ -99988,7 +130570,7 @@ Object { }, "range": Array [ 0, - 17, + 27, ], "type": "VariableDeclaration", }, @@ -99996,8 +130578,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -100006,7 +130588,7 @@ Object { }, "range": Array [ 0, - 18, + 27, ], "sourceType": "module", "tokens": Array [ @@ -100031,7 +130613,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -100041,25 +130623,25 @@ Object { }, "range": Array [ 4, - 7, + 5, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 9, + 6, + 7, ], "type": "Punctuator", "value": "=", @@ -100071,233 +130653,139 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 16, ], - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "RegularExpression", - "value": "/foo./", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 40, - ], - "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "Literal", - "value": Object {}, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 41, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 41, + 18, + 21, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "...", }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 3, + 21, + 22, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 23, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, "range": Array [ - 4, - 5, + 22, + 23, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 25, "line": 1, }, "start": Object { - "column": 6, + "column": 24, "line": 1, }, }, "range": Array [ - 6, - 7, + 24, + 25, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 26, "line": 1, }, "start": Object { - "column": 8, + "column": 25, "line": 1, }, }, "range": Array [ - 8, - 40, + 25, + 26, ], - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "RegularExpression", - "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 27, "line": 1, }, "start": Object { - "column": 40, + "column": 26, "line": 1, }, }, "range": Array [ - 40, - 41, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -100307,7 +130795,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression-multi.src 1`] = ` Object { "body": Array [ Object { @@ -100332,31 +130820,102 @@ Object { "type": "Identifier", }, "init": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { "column": 8, "line": 1, }, - }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 24, + ], + "type": "RestElement", + }, + ], "range": Array [ 8, - 21, + 28, ], - "raw": "/\\\\u{110000}/u", - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", - }, - "type": "Literal", - "value": null, + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { @@ -100366,7 +130925,7 @@ Object { }, "range": Array [ 4, - 21, + 28, ], "type": "VariableDeclarator", }, @@ -100374,7 +130933,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 22, + "column": 29, "line": 1, }, "start": Object { @@ -100384,7 +130943,7 @@ Object { }, "range": Array [ 0, - 22, + 29, ], "type": "VariableDeclaration", }, @@ -100392,8 +130951,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { "column": 0, @@ -100402,7 +130961,7 @@ Object { }, "range": Array [ 0, - 23, + 29, ], "sourceType": "module", "tokens": Array [ @@ -100463,7 +131022,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { @@ -100473,29 +131032,169 @@ Object { }, "range": Array [ 8, - 21, + 16, ], - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, - "type": "RegularExpression", - "value": "/\\\\u{110000}/u", + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 22, + 17, + 18, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 23, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + 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": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -100505,93 +131204,183 @@ Object { } `; -exports[`ecmaFeatures fixtures/regexUFlag/regex-u-simple.src 1`] = ` +exports[`javascript fixtures/restParams/invalid-rest-param.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, + "column": 19, "line": 1, }, "start": Object { - "column": 4, + "column": 14, "line": 1, }, }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, }, - }, + ], "range": Array [ - 10, - 16, + 14, + 19, ], - "raw": "/foo/u", - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "Literal", - "value": Object {}, + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, - 16, + 11, + 19, ], - "type": "VariableDeclarator", + "type": "RestElement", }, ], - "kind": "var", + "range": Array [ + 0, + 22, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 17, + 22, + 23, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -100600,14 +131389,14 @@ Object { }, "range": Array [ 0, - 18, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -100617,281 +131406,187 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 7, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, - 16, + 11, + 14, ], - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "RegularExpression", - "value": "/foo/u", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "range": Array [ - 16, - 17, + 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/regexYFlag/regexp-y-simple.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "raw": "/foo/y", - "regex": Object { - "flags": "y", - "pattern": "foo", - }, - "type": "Literal", - "value": Object {}, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { "column": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, + 16, 17, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "a", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 3, + 18, + 19, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 19, "line": 1, }, }, "range": Array [ - 4, - 7, + 19, + 20, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 20, "line": 1, }, }, "range": Array [ - 8, - 9, + 20, + 21, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 10, + "column": 21, "line": 1, }, }, "range": Array [ - 10, - 16, + 21, + 22, ], - "regex": Object { - "flags": "y", - "pattern": "foo", - }, - "type": "RegularExpression", - "value": "/foo/y", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 16, + "column": 22, "line": 1, }, }, "range": Array [ - 16, - 17, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -100901,7 +131596,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/restParams/basic-rest.src 1`] = ` +exports[`javascript fixtures/restParams/single-rest.src 1`] = ` Object { "body": Array [ Object { @@ -100910,17 +131605,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 22, + 17, + 19, ], "type": "BlockStatement", }, @@ -100946,7 +131641,7 @@ Object { }, "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { @@ -100955,80 +131650,62 @@ Object { }, }, "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, Object { "argument": Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "name": "b", "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 18, + 11, + 15, ], "type": "RestElement", }, ], "range": Array [ 0, - 22, + 19, ], "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "EmptyStatement", }, @@ -101036,7 +131713,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { @@ -101046,7 +131723,7 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "sourceType": "module", "tokens": Array [ @@ -101107,7 +131784,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -101117,43 +131794,7 @@ Object { }, "range": Array [ 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ 14, - 17, ], "type": "Punctuator", "value": "...", @@ -101161,17 +131802,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Identifier", "value": "b", @@ -101179,17 +131820,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", "value": ")", @@ -101197,17 +131838,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 21, + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -101215,17 +131856,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -101233,17 +131874,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -101253,165 +131894,71 @@ Object { } `; -exports[`ecmaFeatures fixtures/restParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 6, + "line": 1, }, }, + "name": "a", "range": Array [ - 14, - 41, + 6, + 7, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "BlockStatement", + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, + "start": Object { + "column": 10, + "line": 1, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 25, - 41, - ], - "type": "FunctionExpression", }, + "range": Array [ + 10, + 13, + ], + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 13, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -101420,17 +131967,16 @@ Object { }, "range": Array [ 0, - 43, + 14, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -101439,7 +131985,7 @@ Object { }, "range": Array [ 0, - 44, + 15, ], "sourceType": "module", "tokens": Array [ @@ -101459,7 +132005,7 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { @@ -101477,7 +132023,7 @@ Object { 7, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { @@ -101495,316 +132041,133 @@ Object { 9, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 40, - 41, + 10, + 13, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 42, - 43, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/restParams/class-method.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float-negative.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, - "name": "foo", "range": Array [ + 11, 14, - 17, ], - "type": "Identifier", + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, - "kind": "method", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, + "operator": "-", + "prefix": true, "range": Array [ + 10, 14, - 33, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 17, - 33, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, + "type": "UnaryExpression", }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 35, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 14, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { "column": 0, @@ -101813,17 +132176,16 @@ Object { }, "range": Array [ 0, - 35, + 15, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -101832,7 +132194,7 @@ Object { }, "range": Array [ 0, - 36, + 16, ], "sourceType": "module", "tokens": Array [ @@ -101852,7 +132214,7 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { @@ -101870,7 +132232,7 @@ Object { 7, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { @@ -101888,259 +132250,340 @@ Object { 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, }, "range": Array [ + 11, 14, - 17, ], - "type": "Identifier", - "value": "foo", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-null.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 14, + ], + "raw": "null", + "type": "Literal", + "value": null, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 18, - 21, + 0, + 15, ], - "type": "Punctuator", - "value": "...", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 21, - 24, + 0, + 5, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 26, - 27, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 32, - 33, + 10, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 14, + "line": 1, }, }, "range": Array [ - 34, - 35, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`ecmaFeatures fixtures/restParams/error-no-default.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-number.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - Object { - "argument": Object { + "init": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 10, "line": 1, }, }, - "name": "b", "range": Array [ - 17, - 18, + 10, + 11, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 6, "line": 1, }, }, "range": Array [ - 14, - 22, + 6, + 11, ], - "type": "RestElement", + "type": "VariableDeclarator", }, ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 24, + 12, ], - "type": "TSDeclareFunction", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -102149,14 +132592,14 @@ Object { }, "range": Array [ 0, - 24, + 13, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -102166,28 +132609,46 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { "column": 9, "line": 1, }, + "start": Object { + "column": 8, + "line": 1, + }, }, "range": Array [ + 8, 9, - 10, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { @@ -102204,8 +132665,8 @@ Object { 10, 11, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { @@ -102222,77 +132683,178 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-number-negative.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "operator": "-", + "prefix": true, + "range": Array [ + 10, + 12, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { "column": 13, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, + 0, 13, ], - "type": "Punctuator", - "value": ",", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 17, + "column": 5, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 17, + 0, + 5, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Identifier", - "value": "b", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 19, + "column": 8, "line": 1, }, }, "range": Array [ - 19, - 20, + 8, + 9, ], "type": "Punctuator", "value": "=", @@ -102300,53 +132862,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 22, + 10, + 11, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 12, "line": 1, }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 13, "line": 1, }, "start": Object { - "column": 23, + "column": 12, "line": 1, }, }, "range": Array [ - 23, - 24, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -102356,126 +132918,89 @@ Object { } `; -exports[`ecmaFeatures fixtures/restParams/error-not-last.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-string.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, + "declarations": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, - "name": "b", + "name": "a", "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "range": Array [ + 10, + 13, + ], + "raw": "'a'", + "type": "Literal", + "value": "a", }, - "range": Array [ - 14, - 18, - ], - "type": "RestElement", - }, - Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 6, "line": 1, }, }, - "name": "c", "range": Array [ - 20, - 21, + 6, + 13, ], - "type": "Identifier", + "type": "VariableDeclarator", }, ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 23, + 14, ], - "type": "TSDeclareFunction", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -102484,14 +133009,14 @@ Object { }, "range": Array [ 0, - 23, + 15, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -102501,187 +133026,268 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 10, + 6, + 7, ], "type": "Identifier", - "value": "f", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ - 11, - 12, + 10, + 13, ], - "type": "Identifier", - "value": "a", + "type": "String", + "value": "'a'", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-undefined.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "undefined", + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 19, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 17, + 0, + 20, ], - "type": "Punctuator", - "value": "...", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 5, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 18, + "column": 6, "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 7, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, "range": Array [ - 20, - 21, + 8, + 9, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 22, + 10, + 19, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -102691,37 +133297,197 @@ Object { } `; -exports[`ecmaFeatures fixtures/restParams/func-expression.src 1`] = ` +exports[`javascript fixtures/spread/complex-spread.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 102, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 22, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "ka", + "range": Array [ + 7, + 9, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 9, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "ka", + "range": Array [ + 7, + 9, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "nested", + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 5, + 22, + ], + "type": "ObjectPattern", }, }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 26, + "column": 32, "line": 1, }, "start": Object { @@ -102729,89 +133495,502 @@ Object { "line": 1, }, }, + "method": false, "range": Array [ 24, - 26, + 32, ], - "type": "BlockStatement", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "other", + "range": Array [ + 27, + 32, + ], + "type": "Identifier", + }, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", }, - "start": Object { - "column": 8, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 92, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + "method": false, + "range": Array [ + 34, + 92, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 92, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 39, + 64, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "properties": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "name": "nested2", + "range": Array [ + 48, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 55, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 43, + 57, + ], + "type": "ObjectPattern", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 59, + "line": 1, + }, + }, + "range": Array [ + 59, + 63, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 64, + ], + "type": "ArrayPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 67, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 66, + 67, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 66, + 80, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 69, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 71, + 72, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 71, + 72, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 71, + 72, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 78, + "line": 1, + }, + "start": Object { + "column": 77, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 77, + 78, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 78, + "line": 1, + }, + "start": Object { + "column": 74, + "line": 1, + }, + }, + "range": Array [ + 74, + 78, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 69, + 80, + ], + "type": "ObjectPattern", }, - "start": Object { - "column": 21, - "line": 1, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 90, + "line": 1, + }, + "start": Object { + "column": 85, + "line": 1, + }, + }, + "name": "rest2", + "range": Array [ + 85, + 90, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 90, + "line": 1, + }, + "start": Object { + "column": 82, + "line": 1, + }, }, + "range": Array [ + 82, + 90, + ], + "type": "RestElement", }, - "name": "a", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, + ], + "range": Array [ + 37, + 92, + ], + "type": "ObjectPattern", + }, + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 22, + "column": 101, "line": 1, }, "start": Object { - "column": 18, + "column": 97, "line": 1, }, }, + "name": "rest", "range": Array [ - 18, - 22, + 97, + 101, ], - "type": "RestElement", + "type": "Identifier", }, - ], - "range": Array [ - 8, - 26, - ], - "type": "FunctionExpression", + "loc": Object { + "end": Object { + "column": 101, + "line": 1, + }, + "start": Object { + "column": 94, + "line": 1, + }, + }, + "range": Array [ + 94, + 101, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 1, + 102, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 112, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 1, + 112, + ], + "right": Object { "loc": Object { "end": Object { - "column": 26, + "column": 112, "line": 1, }, "start": Object { - "column": 4, + "column": 105, "line": 1, }, }, + "name": "complex", "range": Array [ - 4, - 26, + 105, + 112, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 27, + "column": 114, "line": 1, }, "start": Object { @@ -102821,16 +134000,16 @@ Object { }, "range": Array [ 0, - 27, + 114, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -102839,14 +134018,14 @@ Object { }, "range": Array [ 0, - 27, + 115, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -102856,169 +134035,169 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { - "column": 6, + "column": 2, "line": 1, }, }, "range": Array [ - 6, - 7, + 2, + 3, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 16, + 3, + 4, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 6, "line": 1, }, "start": Object { - "column": 17, + "column": 5, "line": 1, }, }, "range": Array [ - 17, - 18, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 18, + "column": 7, "line": 1, }, }, "range": Array [ - 18, - 21, + 7, + 9, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "ka", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 21, + "column": 9, "line": 1, }, }, "range": Array [ - 21, - 22, + 9, + 10, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 14, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 14, "line": 1, }, }, "range": Array [ - 24, - 25, + 14, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "nested", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { - "column": 25, + "column": 21, "line": 1, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", "value": "}", @@ -103026,300 +134205,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 22, "line": 1, }, }, "range": Array [ - 26, - 27, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/restParams/func-expression-multi.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 8, - 28, - ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 29, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 29, + 24, + 25, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 3, + 25, + 26, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 32, "line": 1, }, "start": Object { - "column": 4, + "column": 27, "line": 1, }, }, "range": Array [ - 4, - 5, + 27, + 32, ], "type": "Identifier", - "value": "x", + "value": "other", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 33, "line": 1, }, "start": Object { - "column": 6, + "column": 32, "line": 1, }, }, "range": Array [ - 6, - 7, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 35, "line": 1, }, "start": Object { - "column": 8, + "column": 34, "line": 1, }, }, "range": Array [ - 8, - 16, + 34, + 35, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 36, "line": 1, }, "start": Object { - "column": 16, + "column": 35, "line": 1, }, }, "range": Array [ - 16, - 17, + 35, + 36, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 38, "line": 1, }, "start": Object { - "column": 17, + "column": 37, "line": 1, }, }, "range": Array [ - 17, - 18, + 37, + 38, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, ], "type": "Identifier", "value": "a", @@ -103327,107 +134367,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 41, "line": 1, }, "start": Object { - "column": 18, + "column": 40, "line": 1, }, }, "range": Array [ - 18, - 19, + 40, + 41, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 43, "line": 1, }, "start": Object { - "column": 20, + "column": 42, "line": 1, }, }, "range": Array [ - 20, - 23, + 42, + 43, ], "type": "Punctuator", - "value": "...", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 44, "line": 1, }, "start": Object { - "column": 23, + "column": 43, "line": 1, }, }, "range": Array [ - 23, - 24, + 43, + 44, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 48, "line": 1, }, "start": Object { - "column": 24, + "column": 45, "line": 1, }, }, "range": Array [ - 24, - 25, + 45, + 48, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 55, "line": 1, }, "start": Object { - "column": 26, + "column": 48, "line": 1, }, }, "range": Array [ - 26, - 27, + 48, + 55, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "nested2", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 57, "line": 1, }, "start": Object { - "column": 27, + "column": 56, "line": 1, }, }, "range": Array [ - 27, - 28, + 56, + 57, ], "type": "Punctuator", "value": "}", @@ -103435,301 +134475,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 58, "line": 1, }, "start": Object { - "column": 28, + "column": 57, "line": 1, }, }, "range": Array [ - 28, - 29, + 57, + 58, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/restParams/invalid-rest-param.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 22, + "column": 62, "line": 1, }, "start": Object { - "column": 0, + "column": 59, "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "RestElement", - }, - ], "range": Array [ - 0, - 22, + 59, + 62, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 63, "line": 1, }, "start": Object { - "column": 22, + "column": 62, "line": 1, }, }, "range": Array [ - 22, - 23, + 62, + 63, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 64, "line": 1, }, "start": Object { - "column": 0, + "column": 63, "line": 1, }, }, "range": Array [ - 0, - 8, + 63, + 64, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 65, "line": 1, }, "start": Object { - "column": 9, + "column": 64, "line": 1, }, }, "range": Array [ - 9, - 10, + 64, + 65, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 67, "line": 1, }, "start": Object { - "column": 10, + "column": 66, "line": 1, }, }, "range": Array [ - 10, - 11, + 66, + 67, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 68, "line": 1, }, "start": Object { - "column": 11, + "column": 67, "line": 1, }, }, "range": Array [ - 11, - 14, + 67, + 68, ], "type": "Punctuator", - "value": "...", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 70, "line": 1, }, "start": Object { - "column": 14, + "column": 69, "line": 1, }, }, "range": Array [ - 14, - 15, + 69, + 70, ], "type": "Punctuator", "value": "{", @@ -103737,89 +134619,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 72, "line": 1, }, "start": Object { - "column": 16, + "column": 71, "line": 1, }, }, "range": Array [ - 16, - 17, + 71, + 72, ], "type": "Identifier", - "value": "a", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 73, "line": 1, }, "start": Object { - "column": 18, + "column": 72, "line": 1, }, }, "range": Array [ - 18, - 19, + 72, + 73, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 77, "line": 1, }, "start": Object { - "column": 19, + "column": 74, "line": 1, }, }, "range": Array [ - 19, - 20, + 74, + 77, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 78, "line": 1, }, "start": Object { - "column": 20, + "column": 77, "line": 1, }, }, "range": Array [ - 20, - 21, + 77, + 78, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 80, "line": 1, }, "start": Object { - "column": 21, + "column": 79, "line": 1, }, }, "range": Array [ - 21, - 22, + 79, + 80, ], "type": "Punctuator", "value": "}", @@ -103827,315 +134709,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 81, "line": 1, }, "start": Object { - "column": 22, + "column": 80, "line": 1, }, }, "range": Array [ - 22, - 23, + 80, + 81, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`ecmaFeatures fixtures/restParams/single-rest.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 19, + "column": 85, "line": 1, }, "start": Object { - "column": 0, + "column": 82, "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "RestElement", - }, - ], "range": Array [ - 0, - 19, + 82, + 85, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 90, "line": 1, }, "start": Object { - "column": 19, + "column": 85, "line": 1, }, }, "range": Array [ - 19, - 20, + 85, + 90, ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "rest2", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 92, "line": 1, }, "start": Object { - "column": 0, + "column": 91, "line": 1, }, }, "range": Array [ - 0, - 8, + 91, + 92, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 93, "line": 1, }, "start": Object { - "column": 9, + "column": 92, "line": 1, }, }, "range": Array [ - 9, - 10, + 92, + 93, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 97, "line": 1, }, "start": Object { - "column": 10, + "column": 94, "line": 1, }, }, "range": Array [ - 10, - 11, + 94, + 97, ], "type": "Punctuator", - "value": "(", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 101, "line": 1, }, "start": Object { - "column": 11, + "column": 97, "line": 1, }, }, "range": Array [ - 11, - 14, + 97, + 101, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "rest", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 102, "line": 1, }, "start": Object { - "column": 14, + "column": 101, "line": 1, }, }, "range": Array [ - 14, - 15, + 101, + 102, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 104, "line": 1, }, "start": Object { - "column": 15, + "column": 103, "line": 1, }, }, "range": Array [ - 15, - 16, + 103, + 104, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 112, "line": 1, }, "start": Object { - "column": 17, + "column": 105, "line": 1, }, }, "range": Array [ - 17, - 18, + 105, + 112, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "complex", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 113, "line": 1, }, "start": Object { - "column": 18, + "column": 112, "line": 1, }, }, "range": Array [ - 18, - 19, + 112, + 113, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 114, "line": 1, }, "start": Object { - "column": 19, + "column": 113, "line": 1, }, }, "range": Array [ - 19, - 20, + 113, + 114, ], "type": "Punctuator", "value": ";", @@ -104145,11 +134927,11 @@ Object { } `; -exports[`ecmaFeatures fixtures/spread/error-invalid-if.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/spread/error-invalid-if.src 1`] = `"Expression expected."`; -exports[`ecmaFeatures fixtures/spread/error-invalid-sequence.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/spread/error-invalid-sequence.src 1`] = `"Expression expected."`; -exports[`ecmaFeatures fixtures/spread/multi-function-call.src 1`] = ` +exports[`javascript fixtures/spread/multi-function-call.src 1`] = ` Object { "body": Array [ Object { @@ -104426,7 +135208,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/spread/not-final-param.src 1`] = ` +exports[`javascript fixtures/spread/not-final-param.src 1`] = ` Object { "body": Array [ Object { @@ -104703,7 +135485,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/spread/simple-function-call.src 1`] = ` +exports[`javascript fixtures/spread/simple-function-call.src 1`] = ` Object { "body": Array [ Object { @@ -104926,7 +135708,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/deeply-nested.src 1`] = ` +exports[`javascript fixtures/templateStrings/deeply-nested.src 1`] = ` Object { "body": Array [ Object { @@ -105392,7 +136174,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/error-octal-literal.src 1`] = ` +exports[`javascript fixtures/templateStrings/error-octal-literal.src 1`] = ` Object { "body": Array [ Object { @@ -105513,7 +136295,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/escape-characters.src 1`] = ` +exports[`javascript fixtures/templateStrings/escape-characters.src 1`] = ` Object { "body": Array [ Object { @@ -105728,7 +136510,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/expressions.src 1`] = ` +exports[`javascript fixtures/templateStrings/expressions.src 1`] = ` Object { "body": Array [ Object { @@ -106403,7 +137185,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/multi-line-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/multi-line-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -106539,7 +137321,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/simple-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/simple-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -106660,7 +137442,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/single-dollar-sign.src 1`] = ` +exports[`javascript fixtures/templateStrings/single-dollar-sign.src 1`] = ` Object { "body": Array [ Object { @@ -106873,7 +137655,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/tagged-no-placeholders.src 1`] = ` +exports[`javascript fixtures/templateStrings/tagged-no-placeholders.src 1`] = ` Object { "body": Array [ Object { @@ -107047,7 +137829,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/templateStrings/tagged-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/tagged-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -107774,7 +138556,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/unicodeCodePointEscapes/basic-string-literal.src 1`] = ` +exports[`javascript fixtures/unicodeCodePointEscapes/basic-string-literal.src 1`] = ` Object { "body": Array [ Object { @@ -107873,7 +138655,7 @@ Object { } `; -exports[`ecmaFeatures fixtures/unicodeCodePointEscapes/complex-string-literal.src 1`] = ` +exports[`javascript fixtures/unicodeCodePointEscapes/complex-string-literal.src 1`] = ` Object { "body": Array [ Object { @@ -107972,6 +138754,6 @@ Object { } `; -exports[`ecmaFeatures fixtures/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = `"Hexadecimal digit expected."`; +exports[`javascript fixtures/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = `"Hexadecimal digit expected."`; -exports[`ecmaFeatures fixtures/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = `"An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."`; +exports[`javascript fixtures/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = `"An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."`; diff --git a/packages/typescript-eslint-parser/tests/lib/__snapshots__/jsx.js.snap b/packages/typescript-eslint-parser/tests/lib/__snapshots__/jsx.js.snap index 08c6203a9da6..8a6365ac56b6 100644 --- a/packages/typescript-eslint-parser/tests/lib/__snapshots__/jsx.js.snap +++ b/packages/typescript-eslint-parser/tests/lib/__snapshots__/jsx.js.snap @@ -4337,6 +4337,8 @@ exports[`JSX useJSXTextNode: false fixtures/invalid-no-tag-name.src 1`] = `"Decl exports[`JSX useJSXTextNode: false fixtures/invalid-placeholder-in-closing-tag.src 1`] = `"'>' expected."`; +exports[`JSX useJSXTextNode: false fixtures/invalid-shorthand-fragment-no-closing.src 1`] = `"JSX fragment has no corresponding closing tag."`; + exports[`JSX useJSXTextNode: false fixtures/invalid-trailing-dot-tag-name.src 1`] = `"Identifier expected."`; exports[`JSX useJSXTextNode: false fixtures/invalid-unexpected-comma.src 1`] = `"Identifier expected."`; @@ -6857,6 +6859,505 @@ Object { exports[`JSX useJSXTextNode: false fixtures/self-closing-tag-with-newline.src 1`] = `"Invalid character."`; +exports[`JSX useJSXTextNode: false fixtures/shorthand-fragment.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "children": Array [], + "closingFragment": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 5, + ], + "type": "JSXClosingFragment", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "openingFragment": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "JSXOpeningFragment", + }, + "range": Array [ + 0, + 5, + ], + "type": "JSXFragment", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ">", + }, + ], + "type": "Program", +} +`; + +exports[`JSX useJSXTextNode: false fixtures/shorthand-fragment-with-child.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "children": Array [ + Object { + "children": Array [], + "closingElement": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "openingElement": Object { + "attributes": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "div", + "range": Array [ + 3, + 6, + ], + "type": "JSXIdentifier", + }, + "range": Array [ + 2, + 9, + ], + "selfClosing": true, + "type": "JSXOpeningElement", + }, + "range": Array [ + 2, + 9, + ], + "type": "JSXElement", + }, + ], + "closingFragment": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 12, + ], + "type": "JSXClosingFragment", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "openingFragment": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "JSXOpeningFragment", + }, + "range": Array [ + 0, + 12, + ], + "type": "JSXFragment", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 6, + ], + "type": "JSXIdentifier", + "value": "div", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "/", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ">", + }, + ], + "type": "Program", +} +`; + exports[`JSX useJSXTextNode: false fixtures/spread-child.src 1`] = ` Object { "body": Array [ diff --git a/packages/typescript-eslint-parser/tests/lib/__snapshots__/typescript.js.snap b/packages/typescript-eslint-parser/tests/lib/__snapshots__/typescript.js.snap index 320bf39a58a7..5bf4c966f139 100644 --- a/packages/typescript-eslint-parser/tests/lib/__snapshots__/typescript.js.snap +++ b/packages/typescript-eslint-parser/tests/lib/__snapshots__/typescript.js.snap @@ -4729,36 +4729,59 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-accessibility-modifiers.src 1`] = ` +exports[`typescript fixtures/basics/call-signatures.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 61, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 2, }, "start": Object { @@ -4766,20 +4789,72 @@ Object { "line": 2, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 16, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], "range": Array [ - 14, - 35, + 15, + 34, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 2, }, "start": Object { - "column": 14, + "column": 13, "line": 2, }, }, @@ -4791,11 +4866,11 @@ Object { "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 2, }, "start": Object { - "column": 16, + "column": 15, "line": 2, }, }, @@ -4806,32 +4881,12 @@ Object { "type": "TSStringKeyword", }, }, - "value": null, + "type": "TSCallSignatureDeclaration", }, Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "baz", - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 29, + "column": 24, "line": 3, }, "start": Object { @@ -4839,495 +4894,114 @@ Object { "line": 3, }, }, - "range": Array [ - 38, - 65, - ], - "static": true, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 3, }, "start": Object { - "column": 22, + "column": 6, "line": 3, }, }, + "name": "a", "range": Array [ - 58, - 64, + 41, + 50, ], - "type": "TSNumberKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "getBar", - "range": Array [ - 75, - 81, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 111, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 102, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 103, - 106, - ], - "type": "Identifier", - }, - "range": Array [ - 98, - 106, - ], - "type": "MemberExpression", + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, }, + }, + "range": Array [ + 42, + 50, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 20, - "line": 5, + "column": 15, + "line": 3, }, "start": Object { - "column": 4, - "line": 5, + "column": 9, + "line": 3, }, }, "range": Array [ - 91, - 107, + 44, + 50, ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 4, + "type": "TSStringKeyword", }, }, - "range": Array [ - 85, - 111, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + ], + "range": Array [ + 37, + 59, + ], + "returnType": Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 24, + "line": 3, }, "start": Object { "column": 16, - "line": 4, + "line": 3, }, }, - "params": Array [], "range": Array [ - 82, - 111, + 51, + 59, ], - "type": "FunctionExpression", - }, - }, - Object { - "accessibility": "protected", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, }, - }, - "name": "setBar", - "range": Array [ - 124, - 130, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 7, + "range": Array [ + 53, + 59, + ], + "type": "TSStringKeyword", }, }, - "range": Array [ - 114, - 171, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 156, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "name": "bar", - "range": Array [ - 157, - 160, - ], - "type": "Identifier", - }, - "range": Array [ - 152, - 160, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "operator": "=", - "range": Array [ - 152, - 166, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "name": "bar", - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 167, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 7, - }, - }, - "range": Array [ - 146, - 171, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "name": "bar", - "range": Array [ - 132, - 144, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 136, - 144, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "range": Array [ - 138, - 144, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 131, - 171, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 10, - "line": 1, + "type": "TSConstructSignatureDeclaration", }, - }, - "range": Array [ - 10, - 173, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", "range": Array [ - 6, - 9, + 11, + 61, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeLiteral", }, - "range": Array [ - 0, - 173, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 11, + "line": 5, }, "start": Object { "column": 0, @@ -5336,14 +5010,14 @@ Object { }, "range": Array [ 0, - 174, + 62, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -5353,43 +5027,61 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 9, + 5, + 8, ], "type": "Identifier", - "value": "Foo", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ 11, + 12, ], "type": "Punctuator", "value": "{", @@ -5397,7 +5089,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 2, }, "start": Object { @@ -5406,44 +5098,44 @@ Object { }, }, "range": Array [ - 14, - 21, + 15, + 16, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 4, "line": 2, }, "start": Object { - "column": 10, + "column": 3, "line": 2, }, }, "range": Array [ - 22, - 25, + 16, + 17, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 2, }, "start": Object { - "column": 14, + "column": 4, "line": 2, }, }, "range": Array [ - 26, - 27, + 17, + 18, ], "type": "Punctuator", "value": ":", @@ -5451,17 +5143,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 2, }, "start": Object { - "column": 16, + "column": 6, "line": 2, }, }, "range": Array [ - 28, - 34, + 19, + 25, ], "type": "Identifier", "value": "string", @@ -5469,197 +5161,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 2, }, "start": Object { - "column": 22, + "column": 12, "line": 2, }, }, "range": Array [ - 34, - 35, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 14, + "line": 2, }, "start": Object { - "column": 2, - "line": 3, + "column": 13, + "line": 2, }, }, "range": Array [ - 38, - 44, + 26, + 27, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 21, + "line": 2, }, "start": Object { - "column": 9, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 45, - 51, + 28, + 34, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 5, "line": 3, }, "start": Object { - "column": 16, + "column": 2, "line": 3, }, }, "range": Array [ - 52, - 55, + 37, + 40, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 3, }, "start": Object { - "column": 20, + "column": 5, "line": 3, }, }, "range": Array [ - 56, - 57, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 7, "line": 3, }, "start": Object { - "column": 22, + "column": 6, "line": 3, }, }, "range": Array [ - 58, - 64, + 41, + 42, ], "type": "Identifier", - "value": "number", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 8, "line": 3, }, "start": Object { - "column": 28, + "column": 7, "line": 3, }, }, "range": Array [ - 64, - 65, + 42, + 43, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Keyword", - "value": "public", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 4, + "line": 3, }, "start": Object { "column": 9, - "line": 4, + "line": 3, }, }, "range": Array [ - 75, - 81, + 44, + 50, ], "type": "Identifier", - "value": "getBar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { "column": 16, - "line": 4, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, + "line": 3, }, "start": Object { - "column": 17, - "line": 4, + "column": 15, + "line": 3, }, }, "range": Array [ - 83, - 84, + 50, + 51, ], "type": "Punctuator", "value": ")", @@ -5667,413 +5323,919 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 4, + "column": 17, + "line": 3, }, "start": Object { - "column": 19, - "line": 4, + "column": 16, + "line": 3, }, }, "range": Array [ - 85, - 86, + 51, + 52, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 91, - 97, - ], - "type": "Keyword", - "value": "return", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 24, + "line": 3, }, "start": Object { - "column": 11, - "line": 5, + "column": 18, + "line": 3, }, }, "range": Array [ - 98, - 102, + 53, + 59, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { - "column": 15, - "line": 5, + "column": 0, + "line": 4, }, }, "range": Array [ - 102, - 103, + 60, + 61, ], "type": "Punctuator", - "value": ".", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/call-signatures-with-generics.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", }, - "range": Array [ - 103, - 106, - ], - "type": "Identifier", - "value": "bar", - }, - Object { "loc": Object { "end": Object { - "column": 20, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { - "column": 19, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 106, - 107, + 0, + 67, ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "}", + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 19, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 37, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSCallSignatureDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "range": Array [ + 16, + 17, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 15, + 18, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 47, + 56, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 48, + 56, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 50, + 56, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 40, + 65, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 57, + 65, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 59, + 65, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSConstructSignatureDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + "range": Array [ + 44, + 45, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 43, + 46, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "range": Array [ + 11, + 67, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 68, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 4, + "line": 1, }, "start": Object { - "column": 2, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 114, - 123, + 0, + 4, ], - "type": "Keyword", - "value": "protected", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 7, + "column": 8, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 5, + "line": 1, }, }, "range": Array [ - 124, - 130, + 5, + 8, ], "type": "Identifier", - "value": "setBar", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 7, + "column": 10, + "line": 1, }, "start": Object { - "column": 19, - "line": 7, + "column": 9, + "line": 1, }, }, "range": Array [ - 131, - 132, + 9, + 10, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 7, + "column": 12, + "line": 1, }, "start": Object { - "column": 20, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 132, - 135, + 11, + 12, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 7, + "column": 3, + "line": 2, }, "start": Object { - "column": 24, - "line": 7, + "column": 2, + "line": 2, }, }, "range": Array [ - 136, - 137, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 7, + "column": 4, + "line": 2, }, "start": Object { - "column": 26, - "line": 7, + "column": 3, + "line": 2, }, }, "range": Array [ - 138, - 144, + 16, + 17, ], "type": "Identifier", - "value": "string", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 7, + "column": 5, + "line": 2, }, "start": Object { - "column": 32, - "line": 7, + "column": 4, + "line": 2, }, }, "range": Array [ - 144, - 145, + 17, + 18, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 7, + "column": 6, + "line": 2, }, "start": Object { - "column": 34, - "line": 7, + "column": 5, + "line": 2, }, }, "range": Array [ - 146, - 147, + 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 8, + "column": 7, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 6, + "line": 2, }, }, "range": Array [ - 152, - 156, + 19, + 20, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "column": 8, + "line": 2, }, "start": Object { - "column": 8, - "line": 8, + "column": 7, + "line": 2, }, }, "range": Array [ - 156, - 157, + 20, + 21, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 8, + "column": 15, + "line": 2, }, "start": Object { "column": 9, - "line": 8, + "line": 2, }, }, "range": Array [ - 157, - 160, + 22, + 28, ], "type": "Identifier", - "value": "bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 16, + "line": 2, }, "start": Object { - "column": 13, - "line": 8, + "column": 15, + "line": 2, }, }, "range": Array [ - 161, - 162, + 28, + 29, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { "column": 18, - "line": 8, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, "start": Object { - "column": 15, - "line": 8, + "column": 2, + "line": 3, }, }, "range": Array [ - 163, - 166, + 40, + 43, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, ], "type": "Identifier", - "value": "bar", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 50, + 56, + ], + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 8, + "line": 3, }, "start": Object { "column": 18, - "line": 8, + "line": 3, }, }, "range": Array [ - 166, - 167, + 56, + 57, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 9, + "column": 20, + "line": 3, }, "start": Object { - "column": 2, - "line": 9, + "column": 19, + "line": 3, }, }, "range": Array [ - 170, - 171, + 57, + 58, ], "type": "Punctuator", - "value": "}", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 59, + 65, + ], + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 10, + "line": 4, }, "start": Object { "column": 0, - "line": 10, + "line": 4, }, }, "range": Array [ - 172, - 173, + 66, + 67, ], "type": "Punctuator", "value": "}", @@ -6083,124 +6245,102 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-definite-assignment.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "definite": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, + "expression": Object { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 0, + "line": 1, }, }, + "name": "x", "range": Array [ - 12, - 23, + 0, + 1, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 0, + 5, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 14, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSStringKeyword", + "start": Object { + "column": 4, + "line": 1, }, }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, + "name": "y", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, + "type": "BinaryExpression", }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 16, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "X", "range": Array [ - 6, - 7, + 0, + 16, ], - "type": "Identifier", + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "TSBooleanKeyword", + }, }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -6209,17 +6349,16 @@ Object { }, "range": Array [ 0, - 25, + 17, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -6228,14 +6367,14 @@ Object { }, "range": Array [ 0, - 26, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -6245,354 +6384,218 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, + 1, ], "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", + "value": "x", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 2, + "line": 1, }, "start": Object { "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, + "line": 1, }, }, "range": Array [ - 13, - 14, + 2, + 3, ], "type": "Punctuator", - "value": "!", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 2, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, "range": Array [ - 14, - 15, + 4, + 5, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { "column": 6, - "line": 2, + "line": 1, }, }, "range": Array [ - 16, - 22, + 6, + 8, ], "type": "Identifier", - "value": "string", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 22, - 23, + 9, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 24, - 25, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-export-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - }, - "kind": "constructor", + "expression": Object { + "expression": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 1, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, + "name": "x", "range": Array [ - 16, - 54, + 0, + 1, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "BlockStatement", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, + "start": Object { + "column": 5, + "line": 1, }, - "params": Array [ - Object { - "export": true, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 28, - 44, - ], - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 27, - 54, - ], - "type": "FunctionExpression", }, + "range": Array [ + 5, + 8, + ], + "type": "TSAnyKeyword", }, - ], + }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, "range": Array [ - 10, - 56, + 0, + 13, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, - "start": Object { - "column": 6, - "line": 1, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", }, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -6601,17 +6604,16 @@ Object { }, "range": Array [ 0, - 56, + 14, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 7, + "line": 2, }, "start": Object { "column": 0, @@ -6620,14 +6622,14 @@ Object { }, "range": Array [ 0, - 58, + 15, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -6637,312 +6639,548 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { - "column": 6, + "column": 2, "line": 1, }, }, "range": Array [ - 6, - 9, + 2, + 4, ], "type": "Identifier", - "value": "Foo", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 11, + 5, + 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 16, - 27, + 9, + 11, ], "type": "Identifier", - "value": "constructor", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 28, - 34, + 13, + 14, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/cast-as-multi-assign.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "expression": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 12, + ], + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 12, + ], + "type": "TSNumberKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 19, + ], + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "TSAnyKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 26, ], - "type": "Identifier", - "value": "a", + "type": "ExpressionStatement", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 1, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 2, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 38, - 44, + 1, + 2, ], "type": "Identifier", - "value": "string", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 44, - 45, + 3, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, - }, + "column": 12, + "line": 1, + }, "start": Object { - "column": 34, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 46, - 47, + 6, + 12, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "Identifier", + "value": "as", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 53, - 54, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 25, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 23, + "line": 1, }, }, "range": Array [ - 55, - 56, + 23, + 25, + ], + "type": "Numeric", + "value": "42", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-extends-and-implements.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-operator.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", }, - "range": Array [ - 78, - 80, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 33, + "column": 17, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "ClassWithParentAndInterface", + "operator": "===", "range": Array [ - 6, - 33, + 0, + 17, ], - "type": "Identifier", - }, - "implements": Array [ - Object { + "right": Object { "expression": Object { "loc": Object { "end": Object { - "column": 77, + "column": 7, "line": 1, }, "start": Object { - "column": 66, + "column": 6, "line": 1, }, }, - "name": "MyInterface", "range": Array [ - 66, - 77, + 6, + 7, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, }, "loc": Object { "end": Object { - "column": 77, + "column": 17, "line": 1, }, "start": Object { - "column": 66, + "column": 6, "line": 1, }, }, "range": Array [ - 66, - 77, + 6, + 17, ], - "type": "TSClassImplements", + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, }, - ], + "type": "BinaryExpression", + }, "loc": Object { "end": Object { - "column": 80, + "column": 18, "line": 1, }, "start": Object { @@ -6952,27 +7190,9 @@ Object { }, "range": Array [ 0, - 80, + 18, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "MyOtherClass", - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - }, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], @@ -6988,14 +7208,14 @@ Object { }, "range": Array [ 0, - 81, + 19, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -7005,330 +7225,222 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 33, + 1, ], "type": "Identifier", - "value": "ClassWithParentAndInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "Keyword", - "value": "extends", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 54, + "column": 5, "line": 1, }, "start": Object { - "column": 42, + "column": 2, "line": 1, }, }, "range": Array [ - 42, - 54, + 2, + 5, ], - "type": "Identifier", - "value": "MyOtherClass", + "type": "Punctuator", + "value": "===", }, Object { "loc": Object { "end": Object { - "column": 65, + "column": 7, "line": 1, }, "start": Object { - "column": 55, + "column": 6, "line": 1, }, }, "range": Array [ - 55, - 65, + 6, + 7, ], - "type": "Keyword", - "value": "implements", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 77, + "column": 10, "line": 1, }, "start": Object { - "column": 66, + "column": 8, "line": 1, }, }, "range": Array [ - 66, - 77, + 8, + 10, ], "type": "Identifier", - "value": "MyInterface", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 79, + "column": 17, "line": 1, }, "start": Object { - "column": 78, + "column": 11, "line": 1, }, }, "range": Array [ - 78, - 79, + 11, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 80, + "column": 18, "line": 1, }, "start": Object { - "column": 79, + "column": 17, "line": 1, }, }, "range": Array [ - 79, - 80, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-extends-generic.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-simple.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 26, + "column": 9, "line": 1, }, "start": Object { - "column": 25, + "column": 6, "line": 1, }, }, + "name": "foo", "range": Array [ - 25, - 26, + 6, + 9, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "Identifier", + }, + "init": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, - "name": "B", + "name": "x", "range": Array [ - 25, - 26, + 12, + 13, ], "type": "Identifier", }, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, - "name": Object { + "range": Array [ + 12, + 20, + ], + "type": "TSAsExpression", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 17, "line": 1, }, }, - "name": "A", "range": Array [ - 10, - 11, + 17, + 20, ], - "type": "Identifier", + "type": "TSAnyKeyword", }, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 20, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -7337,7 +7449,7 @@ Object { }, "range": Array [ 0, - 33, + 22, ], "sourceType": "module", "tokens": Array [ @@ -7357,7 +7469,7 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { @@ -7375,61 +7487,61 @@ Object { 9, ], "type": "Identifier", - "value": "Foo", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, "range": Array [ - 10, - 11, + 12, + 13, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 14, "line": 1, }, }, "range": Array [ - 11, - 12, + 14, + 16, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { @@ -7438,103 +7550,218 @@ Object { "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "range": Array [ - 13, + 17, 20, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 20, "line": 1, }, }, "range": Array [ + 20, 21, - 24, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-multi-line-keyword-abstract.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "abstract", + "range": Array [ + 0, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 25, + "column": 8, "line": 1, }, "start": Object { - "column": 24, + "column": 0, "line": 1, }, }, "range": Array [ - 24, - 25, + 0, + 8, ], - "type": "Punctuator", - "value": "<", + "type": "ExpressionStatement", + }, + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "B", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 9, + 19, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 26, + "column": 8, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 8, ], - "type": "Identifier", - "value": "B", + "type": "Keyword", + "value": "abstract", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 26, - 27, + 9, + 14, ], - "type": "Punctuator", - "value": ">", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 28, - 29, + 15, + 16, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -7542,17 +7769,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 31, - 32, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -7562,50 +7789,32 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-extends-generic-multiple.src 1`] = ` +exports[`typescript fixtures/basics/class-multi-line-keyword-declare.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "ClassBody", - }, - "id": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "Foo", + "name": "declare", "range": Array [ - 6, - 9, + 0, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { "column": 0, @@ -7614,212 +7823,70 @@ Object { }, "range": Array [ 0, - 45, + 7, ], - "superClass": Object { + "type": "ExpressionStatement", + }, + Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 8, + "line": 2, }, }, - "name": "Bar", "range": Array [ - 31, - 34, + 16, + 18, ], - "type": "Identifier", + "type": "ClassBody", }, - "superTypeParameters": Object { + "id": Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 34, - "line": 1, + "column": 6, + "line": 2, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "C", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "D", - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - }, - }, - ], + "name": "B", "range": Array [ - 34, - 40, + 14, + 15, ], - "type": "TSTypeParameterInstantiation", + "type": "Identifier", }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 10, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "TSTypeParameterDeclaration", }, + "range": Array [ + 8, + 18, + ], + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -7828,14 +7895,14 @@ Object { }, "range": Array [ 0, - 46, + 19, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -7845,97 +7912,43 @@ Object { }, "range": Array [ 0, - 5, + 7, ], "type": "Keyword", - "value": "class", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 6, - 9, + 8, + 13, ], - "type": "Identifier", - "value": "Foo", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 19, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 20, - 21, + 14, + 15, ], "type": "Identifier", "value": "B", @@ -7943,161 +7956,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "D", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 41, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 41, - 42, + 16, + 17, ], "type": "Punctuator", "value": "{", @@ -8105,17 +7974,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 44, - 45, + 17, + 18, ], "type": "Punctuator", "value": "}", @@ -8125,36 +7994,36 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-generic-method.src 1`] = ` +exports[`typescript fixtures/basics/class-with-accessibility-modifiers.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { + "accessibility": "private", "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 2, }, "start": Object { - "column": 2, + "column": 10, "line": 2, }, }, - "name": "getBar", + "name": "bar", "range": Array [ - 14, - 20, + 22, + 25, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 2, }, "start": Object { @@ -8164,120 +8033,523 @@ Object { }, "range": Array [ 14, - 28, + 35, ], "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 2, }, "start": Object { - "column": 14, + "column": 16, "line": 2, }, }, "range": Array [ - 26, 28, + 34, ], - "type": "BlockStatement", + "type": "TSStringKeyword", }, - "expression": false, - "generator": false, - "id": null, + }, + "value": null, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { "loc": Object { "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { "column": 16, - "line": 2, + "line": 3, + }, + }, + "name": "baz", + "range": Array [ + 52, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 38, + 65, + ], + "static": true, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 20, + "line": 3, }, }, - "params": Array [], "range": Array [ - 23, - 28, + 56, + 64, ], - "type": "FunctionExpression", - "typeParameters": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 28, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 3, }, }, - "params": Array [ + "range": Array [ + 58, + 64, + ], + "type": "TSNumberKeyword", + }, + }, + "value": null, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "getBar", + "range": Array [ + 75, + 81, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 68, + 111, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": Object { + "argument": Object { + "computed": false, "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 5, }, "start": Object { - "column": 9, - "line": 2, + "column": 11, + "line": 5, }, }, - "name": "T", + "object": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 98, + 102, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "bar", + "range": Array [ + 103, + 106, + ], + "type": "Identifier", + }, "range": Array [ - 21, - 22, + 98, + 106, ], - "type": "Identifier", + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, }, "range": Array [ - 21, - 22, + 91, + 107, ], - "type": "TSTypeParameter", + "type": "ReturnStatement", }, ], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, "range": Array [ - 20, - 23, + 85, + 111, ], - "type": "TSTypeParameterDeclaration", + "type": "BlockStatement", }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 30, - ], + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 82, + 111, + ], + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 7, + }, + "start": Object { + "column": 12, + "line": 7, + }, + }, + "name": "setBar", + "range": Array [ + 124, + 130, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 114, + 171, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 156, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "name": "bar", + "range": Array [ + 157, + 160, + ], + "type": "Identifier", + }, + "range": Array [ + 152, + 160, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "operator": "=", + "range": Array [ + 152, + 166, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "name": "bar", + "range": Array [ + 163, + 166, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 167, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 34, + "line": 7, + }, + }, + "range": Array [ + 146, + 171, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 7, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "name": "bar", + "range": Array [ + 132, + 144, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 24, + "line": 7, + }, + }, + "range": Array [ + 136, + 144, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 26, + "line": 7, + }, + }, + "range": Array [ + 138, + 144, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 131, + 171, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 10, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 173, + ], "type": "ClassBody", }, "id": Object { @@ -8301,7 +8573,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 10, }, "start": Object { "column": 0, @@ -8310,7 +8582,7 @@ Object { }, "range": Array [ 0, - 30, + 173, ], "superClass": null, "type": "ClassDeclaration", @@ -8320,7 +8592,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 11, }, "start": Object { "column": 0, @@ -8329,7 +8601,7 @@ Object { }, "range": Array [ 0, - 31, + 174, ], "sourceType": "module", "tokens": Array [ @@ -8390,7 +8662,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 2, }, "start": Object { @@ -8400,876 +8672,673 @@ Object { }, "range": Array [ 14, - 20, + 21, ], - "type": "Identifier", - "value": "getBar", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 2, }, "start": Object { - "column": 8, + "column": 10, "line": 2, }, }, "range": Array [ - 20, - 21, + 22, + 25, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 2, }, "start": Object { - "column": 9, + "column": 14, "line": 2, }, }, "range": Array [ - 21, - 22, + 26, + 27, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 22, "line": 2, }, "start": Object { - "column": 10, + "column": 16, "line": 2, }, }, "range": Array [ - 22, - 23, + 28, + 34, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 23, "line": 2, }, "start": Object { - "column": 11, + "column": 22, "line": 2, }, }, "range": Array [ - 23, - 24, + 34, + 35, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 12, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 24, - 25, + 38, + 44, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 2, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 9, + "line": 3, }, }, "range": Array [ - 26, - 27, + 45, + 51, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { "column": 16, - "line": 2, + "line": 3, + }, + }, + "range": Array [ + 52, + 55, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 20, + "line": 3, }, }, "range": Array [ - 27, - 28, + 56, + 57, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 28, "line": 3, }, "start": Object { - "column": 0, + "column": 22, "line": 3, }, }, "range": Array [ - 29, - 30, + 58, + 64, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, ], "type": "Punctuator", - "value": "}", + "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-generic-method-default.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "getBar", - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 34, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 29, - 34, - ], - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [ - Object { - "default": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "Bar", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 29, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 36, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 0, - 5, + 68, + 74, ], "type": "Keyword", - "value": "class", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 6, - 9, + 75, + 81, ], "type": "Identifier", - "value": "Foo", + "value": "getBar", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 10, - 11, + 82, + 83, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 18, + "line": 4, }, "start": Object { - "column": 2, - "line": 2, + "column": 17, + "line": 4, }, }, "range": Array [ - 14, - 20, + 83, + 84, ], - "type": "Identifier", - "value": "getBar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 4, }, "start": Object { - "column": 8, - "line": 2, + "column": 19, + "line": 4, }, }, "range": Array [ - 20, - 21, + 85, + 86, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 2, + "line": 5, }, "start": Object { - "column": 9, - "line": 2, + "column": 4, + "line": 5, }, }, "range": Array [ - 21, - 22, + 91, + 97, ], - "type": "Identifier", - "value": "T", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 15, + "line": 5, }, "start": Object { "column": 11, - "line": 2, + "line": 5, }, }, "range": Array [ - 23, - 24, + 98, + 102, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 2, + "line": 5, }, "start": Object { - "column": 13, - "line": 2, + "column": 15, + "line": 5, }, }, "range": Array [ - 25, - 28, + 102, + 103, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 19, + "line": 5, }, "start": Object { "column": 16, - "line": 2, + "line": 5, }, }, "range": Array [ - 28, - 29, + 103, + 106, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 20, + "line": 5, }, "start": Object { - "column": 17, - "line": 2, + "column": 19, + "line": 5, }, }, "range": Array [ - 29, - 30, + 106, + 107, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 3, + "line": 6, }, "start": Object { - "column": 18, - "line": 2, + "column": 2, + "line": 6, }, }, "range": Array [ - 30, - 31, + 110, + 111, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 11, + "line": 7, }, "start": Object { - "column": 20, - "line": 2, + "column": 2, + "line": 7, }, }, "range": Array [ - 32, - 33, + 114, + 123, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 18, + "line": 7, }, "start": Object { - "column": 21, - "line": 2, + "column": 12, + "line": 7, }, }, "range": Array [ - 33, - 34, + 124, + 130, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "setBar", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 20, + "line": 7, }, "start": Object { - "column": 0, - "line": 3, + "column": 19, + "line": 7, }, }, "range": Array [ - 35, - 36, + 131, + 132, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-implements.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "TSClassImplements", - }, - ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 20, + "line": 7, }, }, "range": Array [ - 0, - 29, + 132, + 135, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "bar", }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 25, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 7, }, }, "range": Array [ - 0, - 5, + 136, + 137, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 32, + "line": 7, }, "start": Object { - "column": 6, - "line": 1, + "column": 26, + "line": 7, }, }, "range": Array [ - 6, - 9, + 138, + 144, ], "type": "Identifier", - "value": "Foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 33, + "line": 7, }, "start": Object { - "column": 10, - "line": 1, + "column": 32, + "line": 7, }, }, "range": Array [ - 10, - 20, + 144, + 145, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 7, + }, + "start": Object { + "column": 34, + "line": 7, + }, + }, + "range": Array [ + 146, + 147, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 156, ], "type": "Keyword", - "value": "implements", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 9, + "line": 8, }, "start": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 8, }, }, "range": Array [ - 21, - 24, + 156, + 157, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 157, + 160, ], "type": "Identifier", - "value": "Bar", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 25, - "line": 1, + "column": 13, + "line": 8, }, }, "range": Array [ - 25, - 26, + 161, + 162, ], "type": "Punctuator", - "value": "{", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 163, + 166, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 18, + "line": 8, + }, + }, + "range": Array [ + 166, + 167, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 9, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 10, }, "start": Object { "column": 0, - "line": 3, + "line": 10, }, }, "range": Array [ - 28, - 29, + 172, + 173, ], "type": "Punctuator", "value": "}", @@ -9279,32 +9348,192 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-implements-and-extends.src 1`] = ` +exports[`typescript fixtures/basics/class-with-constructor-and-modifier.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], + "body": Array [ + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 39, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 36, + 39, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 33, + 39, + ], + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "public", + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 51, + 64, + ], + "raw": "'constructor'", + "type": "Literal", + "value": "constructor", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 43, + 71, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 68, + 71, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 65, + 71, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 80, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 78, + "column": 8, "line": 1, }, }, "range": Array [ - 78, - 80, + 8, + 73, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 33, + "column": 7, "line": 1, }, "start": Object { @@ -9312,54 +9541,17 @@ Object { "line": 1, }, }, - "name": "ClassWithParentAndInterface", + "name": "C", "range": Array [ 6, - 33, + 7, ], "type": "Identifier", }, - "implements": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "name": "MyInterface", - "range": Array [ - 45, - 56, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 56, - ], - "type": "TSClassImplements", - }, - ], "loc": Object { "end": Object { - "column": 80, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -9368,26 +9560,9 @@ Object { }, "range": Array [ 0, - 80, + 73, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "name": "MyOtherClass", - "range": Array [ - 65, - 77, - ], - "type": "Identifier", - }, + "superClass": null, "type": "ClassDeclaration", }, ], @@ -9395,7 +9570,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 6, }, "start": Object { "column": 0, @@ -9404,7 +9579,7 @@ Object { }, "range": Array [ 0, - 81, + 74, ], "sourceType": "module", "tokens": Array [ @@ -9429,7 +9604,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 7, "line": 1, }, "start": Object { @@ -9439,97 +9614,115 @@ Object { }, "range": Array [ 6, - 33, + 7, ], "type": "Identifier", - "value": "ClassWithParentAndInterface", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 9, "line": 1, }, "start": Object { - "column": 34, + "column": 8, "line": 1, }, }, "range": Array [ - 34, - 44, + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 21, ], "type": "Keyword", - "value": "implements", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 45, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 45, - 56, + 22, + 33, ], "type": "Identifier", - "value": "MyInterface", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 64, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 57, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 57, - 64, + 33, + 34, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 77, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 65, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 65, - 77, + 34, + 35, ], - "type": "Identifier", - "value": "MyOtherClass", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 79, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 78, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 78, - 79, + 36, + 37, ], "type": "Punctuator", "value": "{", @@ -9537,161 +9730,424 @@ Object { Object { "loc": Object { "end": Object { - "column": 80, - "line": 1, + "column": 29, + "line": 2, }, "start": Object { - "column": 79, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 79, - 80, + 38, + 39, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-implements-generic.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, }, - "range": Array [ - 28, - 32, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "range": Array [ + 43, + 49, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, - "implements": Array [ - Object { - "expression": Object { + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 51, + 64, + ], + "type": "String", + "value": "'constructor'", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-constructor-and-return-type.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 12, + 23, + ], + "type": "Identifier", + }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "Bar", "range": Array [ - 21, - 24, + 12, + 37, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 23, + 37, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 21, - 24, - ], - "type": "TSClassImplements", - "typeParameters": Object { + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 4, + }, + }, + "range": Array [ + 42, + 55, + ], + "raw": "'constructor'", + "type": "Literal", + "value": "constructor", + }, + "kind": "method", "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 31, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 2, + "line": 4, }, }, - "params": Array [ - Object { + "range": Array [ + 41, + 70, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 31, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 28, + "line": 4, }, }, "range": Array [ - 25, - 26, + 67, + 70, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 56, + 70, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 58, + 66, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 27, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 21, + "line": 4, }, }, - "name": "S", "range": Array [ - 25, - 26, + 60, + 66, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, }, }, - ], + "range": Array [ + 8, + 72, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -9700,7 +10156,7 @@ Object { }, "range": Array [ 0, - 32, + 72, ], "superClass": null, "type": "ClassDeclaration", @@ -9710,7 +10166,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -9719,7 +10175,7 @@ Object { }, "range": Array [ 0, - 33, + 73, ], "sourceType": "module", "tokens": Array [ @@ -9744,7 +10200,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -9754,537 +10210,331 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 20, + 8, + 9, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 21, - 24, + 12, + 23, ], "type": "Identifier", - "value": "Bar", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ + 23, 24, - 25, ], "type": "Punctuator", - "value": "<", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ + 24, 25, - 26, ], - "type": "Identifier", - "value": "S", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ + 25, 26, - 27, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 28, - 29, + 27, + 33, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 24, + "line": 2, }, }, "range": Array [ - 31, - 32, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-implements-generic-multiple.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "TSClassImplements", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "S", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 24, - 30, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 0, - 35, + 36, + 37, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 0, - 5, + 41, + 42, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 16, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 3, + "line": 4, }, }, "range": Array [ - 6, - 9, + 42, + 55, ], - "type": "Identifier", - "value": "Foo", + "type": "String", + "value": "'constructor'", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 10, - 20, + 55, + 56, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 21, - 24, + 56, + 57, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 24, - 25, + 57, + 58, ], "type": "Punctuator", - "value": "<", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 4, }, }, "range": Array [ - 25, - 26, + 58, + 59, ], - "type": "Identifier", - "value": "S", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 27, - "line": 1, + "line": 4, }, "start": Object { - "column": 26, - "line": 1, + "column": 21, + "line": 4, }, }, "range": Array [ - 26, - 27, + 60, + 66, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 29, - "line": 1, + "line": 4, }, "start": Object { "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "line": 4, }, }, "range": Array [ - 29, - 30, + 67, + 68, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 31, + "line": 4, }, "start": Object { - "column": 31, - "line": 1, + "column": 30, + "line": 4, }, }, "range": Array [ - 31, - 32, + 69, + 70, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 34, - 35, + 71, + 72, ], "type": "Punctuator", "value": "}", @@ -10294,351 +10544,237 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-mixin.src 1`] = ` +exports[`typescript fixtures/basics/class-with-constructor-and-type-parameters.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [ Object { - "argument": Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 12, + 23, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 32, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 33, + "column": 22, "line": 2, }, "start": Object { - "column": 30, + "column": 19, "line": 2, }, }, "range": Array [ - 79, - 82, + 29, + 32, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": null, "loc": Object { "end": Object { - "column": 33, + "column": 22, "line": 2, }, "start": Object { - "column": 11, + "column": 16, "line": 2, }, }, + "params": Array [], "range": Array [ - 60, - 82, + 26, + 32, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 4, }, - "name": "Base", - "range": Array [ - 74, - 78, - ], - "type": "Identifier", }, - "type": "ClassExpression", + "range": Array [ + 37, + 50, + ], + "raw": "'constructor'", + "type": "Literal", + "value": "constructor", }, + "kind": "method", "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 26, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 53, - 82, + 36, + 60, ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 84, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "M", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "Base", - "range": Array [ - 38, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeReference", - "typeName": Object { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 44, - "line": 1, + "column": 23, + "line": 4, }, }, - "name": "T", "range": Array [ - 44, - 45, + 57, + 60, ], - "type": "Identifier", + "type": "BlockStatement", }, - }, - }, - }, - ], - "range": Array [ - 0, - 84, - ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 20, + "line": 4, }, }, + "params": Array [], "range": Array [ - 21, - 36, + 54, + 60, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Constructor", - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - }, + "type": "FunctionExpression", "typeParameters": Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 32, - "line": 1, + "column": 17, + "line": 4, }, }, "params": Array [ Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 33, - "line": 1, + "column": 18, + "line": 4, }, }, - "members": Array [], + "name": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "name": "T", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, "range": Array [ - 33, - 35, + 52, + 53, ], - "type": "TSTypeLiteral", + "type": "TSTypeParameter", }, ], "range": Array [ - 32, - 36, + 51, + 54, ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "name": "T", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", }, - "range": Array [ - 11, - 36, - ], - "type": "TSTypeParameter", }, ], - "range": Array [ - 10, - 37, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "body": Object { - "body": Array [], "loc": Object { "end": Object { - "column": 42, + "column": 1, "line": 5, }, "start": Object { - "column": 39, - "line": 5, + "column": 8, + "line": 1, }, }, "range": Array [ - 125, - 128, + 8, + 62, ], "type": "ClassBody", }, @@ -10646,819 +10782,393 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 5, + "line": 1, }, "start": Object { "column": 6, - "line": 5, + "line": 1, }, }, - "name": "X", + "name": "C", "range": Array [ - 92, - 93, + 6, + 7, ], "type": "Identifier", }, - "implements": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "name": "I", - "range": Array [ - 123, - 124, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "TSClassImplements", - }, - ], "loc": Object { "end": Object { - "column": 42, + "column": 1, "line": 5, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 86, - 128, + 0, + 62, ], - "superClass": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "name": "C", - "range": Array [ - 109, - 110, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "M", - "range": Array [ - 102, - 103, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 63, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 102, - 111, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 103, - 108, - ], - "type": "TSTypeParameterInstantiation", + "start": Object { + "column": 0, + "line": 1, }, }, - "type": "ClassDeclaration", + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", }, Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 138, - 141, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, + "start": Object { + "column": 6, + "line": 1, }, - "name": "C", - "range": Array [ - 136, - 137, - ], - "type": "Identifier", }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "C", + }, + Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 9, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 8, + "line": 1, }, }, "range": Array [ - 130, - 141, + 8, + 9, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "{", }, Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 154, - 157, - ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "name": "I", - "range": Array [ - 152, - 153, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 13, + "line": 2, }, "start": Object { - "column": 0, - "line": 8, + "column": 2, + "line": 2, }, }, "range": Array [ - 142, - 157, + 12, + 23, ], - "type": "TSInterfaceDeclaration", + "type": "Identifier", + "value": "constructor", }, Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "Constructor", - "range": Array [ - 163, - 174, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 48, - "line": 9, + "column": 14, + "line": 2, }, "start": Object { - "column": 0, - "line": 9, + "column": 13, + "line": 2, }, }, "range": Array [ - 158, - 206, + 23, + 24, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "name": "args", - "range": Array [ - 188, - 192, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "range": Array [ - 185, - 199, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 9, - }, - }, - "range": Array [ - 192, - 199, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "TSAnyKeyword", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 199, - ], - "type": "TSArrayType", - }, - }, - }, - ], - "range": Array [ - 180, - 205, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 201, - 205, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "name": "T", - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - }, - }, - }, - "type": "TSConstructorType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "T", - "range": Array [ - 175, - 176, - ], - "type": "Identifier", - }, - "range": Array [ - 175, - 176, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 174, - 177, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "<", }, - }, - "range": Array [ - 0, - 207, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 0, - 8, + 24, + 25, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 9, - 10, + 25, + 26, ], - "type": "Identifier", - "value": "M", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 10, - 11, + 26, + 27, ], "type": "Punctuator", - "value": "<", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 11, - 12, + 27, + 28, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 13, - 20, + 29, + 30, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { "column": 21, - "line": 1, + "line": 2, }, }, "range": Array [ - 21, + 31, 32, ], - "type": "Identifier", - "value": "Constructor", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 32, - 33, + 36, + 37, ], "type": "Punctuator", - "value": "<", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 16, + "line": 4, }, "start": Object { - "column": 33, - "line": 1, + "column": 3, + "line": 4, }, }, "range": Array [ - 33, - 34, + 37, + 50, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "'constructor'", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 34, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 34, - 35, + 50, + 51, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 35, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 35, - 36, + 51, + 52, ], "type": "Punctuator", - "value": ">", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 36, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 36, - 37, + 52, + 53, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 37, - "line": 1, + "column": 19, + "line": 4, }, }, "range": Array [ - 37, - 38, + 53, + 54, ], "type": "Punctuator", - "value": "(", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 21, + "line": 4, }, "start": Object { - "column": 38, - "line": 1, + "column": 20, + "line": 4, }, }, "range": Array [ - 38, - 42, + 54, + 55, ], - "type": "Identifier", - "value": "Base", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 22, + "line": 4, }, "start": Object { - "column": 42, - "line": 1, + "column": 21, + "line": 4, }, }, "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, + 55, + 56, ], "type": "Punctuator", "value": ")", @@ -11466,17 +11176,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 47, - "line": 1, + "column": 23, + "line": 4, }, }, "range": Array [ - 47, - 48, + 57, + 58, ], "type": "Punctuator", "value": "{", @@ -11484,112 +11194,158 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 26, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 25, + "line": 4, }, }, "range": Array [ - 53, 59, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ 60, - 65, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 66, - 73, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 74, - 78, ], - "type": "Identifier", - "value": "Base", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 30, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 79, - 80, + 61, + 62, ], "type": "Punctuator", - "value": "{", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-definite-assignment.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, + "body": Object { + "body": Array [ + Object { + "computed": false, + "definite": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 23, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 22, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - "start": Object { - "column": 32, - "line": 2, + "range": Array [ + 8, + 25, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "X", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { "column": 1, @@ -11597,30 +11353,48 @@ Object { }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 83, - 84, + 0, + 25, ], - "type": "Punctuator", - "value": "}", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 86, - 91, + 0, + 5, ], "type": "Keyword", "value": "class", @@ -11629,16 +11403,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 5, + "line": 1, }, "start": Object { "column": 6, - "line": 5, + "line": 1, }, }, "range": Array [ - 92, - 93, + 6, + 7, ], "type": "Identifier", "value": "X", @@ -11646,341 +11420,409 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { "column": 8, - "line": 5, - }, - }, - "range": Array [ - 94, - 101, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, + "line": 1, }, }, "range": Array [ - 103, - 104, + 8, + 9, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 5, + "column": 3, + "line": 2, }, "start": Object { - "column": 18, - "line": 5, + "column": 2, + "line": 2, }, }, "range": Array [ - 104, - 107, + 12, + 13, ], "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ">", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 5, + "column": 4, + "line": 2, }, "start": Object { - "column": 22, - "line": 5, + "column": 3, + "line": 2, }, }, "range": Array [ - 108, - 109, + 13, + 14, ], "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Identifier", - "value": "C", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 5, + "column": 5, + "line": 2, }, "start": Object { - "column": 24, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 110, - 111, + 14, + 15, ], "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 26, - "line": 5, - }, - }, - "range": Array [ - 112, - 122, - ], - "type": "Keyword", - "value": "implements", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 5, + "column": 12, + "line": 2, }, "start": Object { - "column": 37, - "line": 5, + "column": 6, + "line": 2, }, }, "range": Array [ - 123, - 124, + 16, + 22, ], "type": "Identifier", - "value": "I", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 5, + "column": 13, + "line": 2, }, "start": Object { - "column": 39, - "line": 5, + "column": 12, + "line": 2, }, }, "range": Array [ - 125, - 126, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 41, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 127, - 128, + 24, + 25, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-export-parameter-properties.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 130, - 135, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 16, + 27, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 54, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "export": true, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 35, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 44, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 28, + 44, + ], + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 27, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "range": Array [ + 10, + 56, + ], + "type": "ClassBody", }, - "range": Array [ - 136, - 137, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": "{", - }, - Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 1, + "line": 5, }, "start": Object { - "column": 10, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 140, - 141, + 0, + 56, ], - "type": "Punctuator", - "value": "}", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 7, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "column": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 8, + "line": 1, }, }, "range": Array [ - 142, - 151, + 0, + 5, ], "type": "Keyword", - "value": "interface", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 8, + "column": 9, + "line": 1, }, "start": Object { - "column": 10, - "line": 8, + "column": 6, + "line": 1, }, }, "range": Array [ - 152, - 153, + 6, + 9, ], "type": "Identifier", - "value": "I", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 8, + "column": 11, + "line": 1, }, "start": Object { - "column": 12, - "line": 8, + "column": 10, + "line": 1, }, }, "range": Array [ - 154, - 155, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -11989,434 +11831,213 @@ Object { "loc": Object { "end": Object { "column": 15, - "line": 8, + "line": 2, }, "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { "column": 4, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, + "line": 2, }, }, "range": Array [ - 158, - 162, + 16, + 27, ], "type": "Identifier", - "value": "type", + "value": "constructor", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 9, + "line": 2, }, "start": Object { - "column": 5, - "line": 9, + "column": 15, + "line": 2, }, }, "range": Array [ - 163, - 174, + 27, + 28, ], - "type": "Identifier", - "value": "Constructor", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "column": 22, + "line": 2, }, "start": Object { "column": 16, - "line": 9, + "line": 2, }, }, "range": Array [ - 174, - 175, + 28, + 34, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 9, + "column": 24, + "line": 2, }, "start": Object { - "column": 17, - "line": 9, + "column": 23, + "line": 2, }, }, "range": Array [ - 175, - 176, + 35, + 36, ], "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "=", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 9, + "line": 2, }, "start": Object { - "column": 22, - "line": 9, + "column": 24, + "line": 2, }, }, "range": Array [ - 180, - 183, + 36, + 37, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 9, + "column": 32, + "line": 2, }, "start": Object { "column": 26, - "line": 9, + "line": 2, }, }, "range": Array [ - 184, - 185, + 38, + 44, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 9, + "column": 33, + "line": 2, }, "start": Object { - "column": 27, - "line": 9, + "column": 32, + "line": 2, }, }, "range": Array [ - 185, - 188, + 44, + 45, ], "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "range": Array [ - 188, - 192, - ], - "type": "Identifier", - "value": "args", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 35, - "line": 9, + "line": 2, }, "start": Object { "column": 34, - "line": 9, + "line": 2, }, }, "range": Array [ - 192, - 193, + 46, + 47, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "Identifier", - "value": "any", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 9, + "column": 5, + "line": 4, }, "start": Object { - "column": 39, - "line": 9, + "column": 4, + "line": 4, }, }, "range": Array [ - 197, - 198, + 53, + 54, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 9, + "column": 1, + "line": 5, }, "start": Object { - "column": 40, - "line": 9, + "column": 0, + "line": 5, }, }, "range": Array [ - 198, - 199, + 55, + 56, ], "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 201, - 203, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 47, - "line": 9, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` +exports[`typescript fixtures/basics/class-with-extends-and-implements.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "range": Array [ - 14, - 43, - ], - "static": false, - "type": "ClassProperty", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "undefined", - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 80, + "line": 1, }, "start": Object { - "column": 8, + "column": 78, "line": 1, }, }, "range": Array [ - 8, - 45, + 78, + 80, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 33, "line": 1, }, "start": Object { @@ -12424,17 +12045,54 @@ Object { "line": 1, }, }, - "name": "X", + "name": "ClassWithParentAndInterface", "range": Array [ 6, - 7, + 33, ], "type": "Identifier", }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "name": "MyInterface", + "range": Array [ + 66, + 77, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "range": Array [ + 66, + 77, + ], + "type": "TSClassImplements", + }, + ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 80, + "line": 1, }, "start": Object { "column": 0, @@ -12443,9 +12101,26 @@ Object { }, "range": Array [ 0, - 45, + 80, ], - "superClass": null, + "superClass": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "name": "MyOtherClass", + "range": Array [ + 42, + 54, + ], + "type": "Identifier", + }, "type": "ClassDeclaration", }, ], @@ -12453,7 +12128,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -12462,7 +12137,7 @@ Object { }, "range": Array [ 0, - 46, + 81, ], "sourceType": "module", "tokens": Array [ @@ -12487,7 +12162,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 33, "line": 1, }, "start": Object { @@ -12497,174 +12172,164 @@ Object { }, "range": Array [ 6, - 7, + 33, ], "type": "Identifier", - "value": "X", + "value": "ClassWithParentAndInterface", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 41, "line": 1, }, "start": Object { - "column": 8, + "column": 34, "line": 1, }, }, "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, + 34, + 41, ], "type": "Keyword", - "value": "private", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 54, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 22, - 23, + 42, + 54, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "MyOtherClass", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 65, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 55, + "line": 1, }, }, "range": Array [ - 23, - 28, + 55, + 65, ], - "type": "String", - "value": "'foo'", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 77, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 66, + "line": 1, }, }, "range": Array [ - 28, - 29, + 66, + 77, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "MyInterface", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 79, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 78, + "line": 1, }, }, "range": Array [ - 29, - 30, + 78, + 79, ], "type": "Punctuator", - "value": "?", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 80, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 79, + "line": 1, }, }, "range": Array [ - 31, - 32, + 79, + 80, ], "type": "Punctuator", - "value": "=", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-extends-generic.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 1, + }, }, + "range": Array [ + 28, + 32, + ], + "type": "ClassBody", }, - "range": Array [ - 33, - 42, - ], - "type": "Keyword", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { "column": 1, @@ -12672,340 +12337,147 @@ Object { }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 44, - 45, + 0, + 32, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ + "superClass": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "superTypeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": 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", "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 14, - 21, + 25, + 26, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 25, + "line": 1, }, }, - "params": Array [], + "name": "B", "range": Array [ - 18, - 21, + 25, + 26, ], - "type": "TSEmptyBodyFunctionExpression", + "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", + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 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", - }, + "column": 10, + "line": 1, }, - "type": "TSEmptyBodyFunctionExpression", }, - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { + "name": Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { "column": 10, - "line": 4, + "line": 1, }, }, - "name": "baz", - "optional": true, + "name": "A", "range": Array [ - 50, - 53, + 10, + 11, ], "type": "Identifier", }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, "range": Array [ - 42, - 65, + 10, + 11, ], - "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, - }, - }, - "params": Array [], - "range": Array [ - 54, - 65, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSEmptyBodyFunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, + "type": "TSTypeParameter", }, - }, - "range": Array [ - 10, - 67, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", "range": Array [ - 6, 9, + 12, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 67, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -13014,7 +12486,7 @@ Object { }, "range": Array [ 0, - 68, + 33, ], "sourceType": "module", "tokens": Array [ @@ -13057,156 +12529,156 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 10, - 11, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 17, + 10, + 11, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 17, - 18, + 11, + 12, ], "type": "Punctuator", - "value": "?", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 18, - 19, + 13, + 20, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 19, - 20, + 21, + 24, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 20, - 21, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 24, - 27, + 25, + 26, ], "type": "Identifier", - "value": "bar", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ + 26, 27, - 28, ], "type": "Punctuator", - "value": "?", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 6, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ @@ -13214,497 +12686,289 @@ Object { 29, ], "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 1, "line": 3, }, "start": Object { - "column": 8, + "column": 0, "line": 3, }, }, "range": Array [ - 30, 31, + 32, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-extends-generic-multiple.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 1, + }, }, + "range": Array [ + 41, + 45, + ], + "type": "ClassBody", }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 2, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 49, + 0, + 45, ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, + "superClass": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, }, + "name": "Bar", + "range": Array [ + 31, + 34, + ], + "type": "Identifier", }, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, + "superTypeParameters": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-optional-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 35, + "line": 1, }, }, - "optional": true, "range": Array [ - 14, - 19, + 35, + 36, ], - "static": false, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "key": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 35, + "line": 1, }, }, - "name": "bar", + "name": "C", "range": Array [ - 22, - 25, + 35, + 36, ], "type": "Identifier", }, + }, + Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 39, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 38, + "line": 1, }, }, - "optional": true, "range": Array [ - 22, - 36, + 38, + 39, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 39, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 38, + "line": 1, }, }, + "name": "D", "range": Array [ - 27, - 35, + 38, + 39, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "TSStringKeyword", - }, + "type": "Identifier", }, - "value": null, }, + ], + "range": Array [ + 34, + 40, + ], + "type": "TSTypeParameterInstantiation", + }, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ Object { - "accessibility": "private", - "computed": false, - "key": Object { + "constraint": Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 10, - "line": 4, + "column": 20, + "line": 1, }, }, - "name": "baz", "range": Array [ - 47, - 50, + 20, + 21, ], - "type": "Identifier", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, }, "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 10, + "line": 1, }, }, - "optional": true, - "range": Array [ - 39, - 61, - ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 15, - "line": 4, + "column": 10, + "line": 1, }, }, + "name": "A", "range": Array [ - 52, - 60, + 10, + 11, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "TSStringKeyword", - }, + "type": "Identifier", }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, + "range": Array [ + 10, + 21, + ], + "type": "TSTypeParameter", }, - }, - "range": Array [ - 10, - 63, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", "range": Array [ - 6, 9, + 22, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 63, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -13713,7 +12977,7 @@ Object { }, "range": Array [ 0, - 64, + 46, ], "sourceType": "module", "tokens": Array [ @@ -13756,287 +13020,251 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 10, - 11, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 17, + 10, + 11, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 17, - 18, + 12, + 19, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 18, - 19, + 20, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ + 21, 22, - 25, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 25, - 26, + 23, + 30, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, + "column": 34, + "line": 1, }, "start": Object { - "column": 9, - "line": 3, + "column": 31, + "line": 1, }, }, "range": Array [ - 29, - 35, + 31, + 34, ], "type": "Identifier", - "value": "string", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ + 34, 35, - 36, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 39, - 46, - ], - "type": "Keyword", - "value": "private", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 36, + "line": 1, }, "start": Object { - "column": 10, - "line": 4, + "column": 35, + "line": 1, }, }, "range": Array [ - 47, - 50, + 35, + 36, ], "type": "Identifier", - "value": "baz", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 37, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 36, + "line": 1, }, }, "range": Array [ - 50, - 51, + 36, + 37, ], "type": "Punctuator", - "value": "?", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 4, + "column": 39, + "line": 1, }, "start": Object { - "column": 15, - "line": 4, + "column": 38, + "line": 1, }, }, "range": Array [ - 52, - 53, + 38, + 39, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "D", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 39, + "line": 1, }, }, "range": Array [ - 54, - 60, + 39, + 40, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 42, + "line": 1, }, "start": Object { - "column": 23, - "line": 4, + "column": 41, + "line": 1, }, }, "range": Array [ - 60, - 61, + 41, + 42, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 62, - 63, + 44, + 45, ], "type": "Punctuator", "value": "}", @@ -14046,36 +13274,36 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-optional-property-undefined.src 1`] = ` +exports[`typescript fixtures/basics/class-with-generic-method.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "accessibility": "private", "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 2, }, "start": Object { - "column": 10, + "column": 2, "line": 2, }, }, - "name": "foo", + "name": "getBar", "range": Array [ + 14, 20, - 23, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 2, }, "start": Object { @@ -14083,30 +13311,105 @@ Object { "line": 2, }, }, - "optional": true, "range": Array [ - 12, - 37, + 14, + 28, ], "static": false, - "type": "ClassProperty", + "type": "MethodDefinition", "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 2, }, "start": Object { - "column": 17, + "column": 11, "line": 2, }, }, - "name": "undefined", + "params": Array [], "range": Array [ - 27, - 36, + 23, + 28, ], - "type": "Identifier", + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 23, + ], + "type": "TSTypeParameterDeclaration", + }, }, }, ], @@ -14116,20 +13419,20 @@ Object { "line": 3, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 39, + 10, + 30, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { @@ -14137,10 +13440,10 @@ Object { "line": 1, }, }, - "name": "X", + "name": "Foo", "range": Array [ 6, - 7, + 9, ], "type": "Identifier", }, @@ -14156,7 +13459,7 @@ Object { }, "range": Array [ 0, - 39, + 30, ], "superClass": null, "type": "ClassDeclaration", @@ -14166,7 +13469,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -14175,7 +13478,7 @@ Object { }, "range": Array [ 0, - 41, + 31, ], "sourceType": "module", "tokens": Array [ @@ -14200,7 +13503,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { @@ -14210,25 +13513,25 @@ Object { }, "range": Array [ 6, - 7, + 9, ], "type": "Identifier", - "value": "X", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -14236,7 +13539,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 2, }, "start": Object { @@ -14245,38 +13548,74 @@ Object { }, }, "range": Array [ - 12, - 19, + 14, + 20, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "getBar", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 2, }, "start": Object { - "column": 10, + "column": 8, "line": 2, }, }, "range": Array [ 20, - 23, + 21, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, ], "type": "Identifier", - "value": "foo", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 2, }, "start": Object { - "column": 13, + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, "line": 2, }, }, @@ -14285,61 +13624,61 @@ Object { 24, ], "type": "Punctuator", - "value": "?", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 2, }, "start": Object { - "column": 15, + "column": 12, "line": 2, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 15, "line": 2, }, "start": Object { - "column": 17, + "column": 14, "line": 2, }, }, "range": Array [ + 26, 27, - 36, ], - "type": "Keyword", - "value": "undefined", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 2, }, "start": Object { - "column": 26, + "column": 15, "line": 2, }, }, "range": Array [ - 36, - 37, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { @@ -14353,8 +13692,8 @@ Object { }, }, "range": Array [ - 38, - 39, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -14364,7 +13703,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-private-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-generic-method-default.src 1`] = ` Object { "body": Array [ Object { @@ -14375,7 +13714,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 2, }, "start": Object { @@ -14383,18 +13722,18 @@ Object { "line": 2, }, }, - "name": "constructor", + "name": "getBar", "range": Array [ 14, - 25, + 20, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 22, + "line": 2, }, "start": Object { "column": 2, @@ -14403,7 +13742,7 @@ Object { }, "range": Array [ 14, - 201, + 34, ], "static": false, "type": "MethodDefinition", @@ -14413,17 +13752,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 22, + "line": 2, }, "start": Object { - "column": 57, - "line": 5, + "column": 20, + "line": 2, }, }, "range": Array [ - 199, - 201, + 32, + 34, ], "type": "BlockStatement", }, @@ -14432,382 +13771,116 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 22, + "line": 2, }, "start": Object { - "column": 13, + "column": 17, "line": 2, }, }, - "params": Array [ - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "params": Array [], + "range": Array [ + 29, + 34, + ], + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 34, - 51, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 8, + "line": 2, + }, + }, + "params": Array [ + Object { + "default": Object { "loc": Object { "end": Object { - "column": 39, + "column": 16, "line": 2, }, "start": Object { - "column": 31, + "column": 13, "line": 2, }, }, "range": Array [ - 43, - 51, + 25, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 39, + "column": 16, "line": 2, }, "start": Object { - "column": 33, + "column": 13, "line": 2, }, }, + "name": "Bar", "range": Array [ - 45, - 51, + 25, + 28, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, - }, - "range": Array [ - 26, - 51, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "parameter": Object { "loc": Object { "end": Object { - "column": 47, - "line": 3, + "column": 16, + "line": 2, }, "start": Object { - "column": 31, - "line": 3, + "column": 9, + "line": 2, }, }, - "name": "lastName", - "range": Array [ - 84, - 100, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 92, - 100, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 67, - 100, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 124, - 135, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 127, - 135, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 129, - 135, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 116, - 140, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 138, - 140, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 116, - 140, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameter": Object { - "left": Object { + "name": Object { "loc": Object { "end": Object { - "column": 47, - "line": 5, + "column": 10, + "line": 2, }, "start": Object { - "column": 31, - "line": 5, + "column": 9, + "line": 2, }, }, - "name": "student", + "name": "T", "range": Array [ - 173, - 189, + 21, + 22, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 180, - 189, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 182, - 189, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, }, "range": Array [ - 156, - 197, + 21, + 28, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 192, - 197, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", + "type": "TSTypeParameter", }, - "range": Array [ - 156, - 197, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 201, - ], - "type": "FunctionExpression", + ], + "range": Array [ + 20, + 29, + ], + "type": "TSTypeParameterDeclaration", + }, }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 3, }, "start": Object { "column": 10, @@ -14816,7 +13889,7 @@ Object { }, "range": Array [ 10, - 203, + 36, ], "type": "ClassBody", }, @@ -14841,7 +13914,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -14850,7 +13923,7 @@ Object { }, "range": Array [ 0, - 203, + 36, ], "superClass": null, "type": "ClassDeclaration", @@ -14859,8 +13932,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -14869,7 +13942,7 @@ Object { }, "range": Array [ 0, - 203, + 37, ], "sourceType": "module", "tokens": Array [ @@ -14930,7 +14003,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 2, }, "start": Object { @@ -14940,547 +14013,690 @@ Object { }, "range": Array [ 14, - 25, + 20, ], "type": "Identifier", - "value": "constructor", + "value": "getBar", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 2, }, "start": Object { - "column": 13, + "column": 8, "line": 2, }, }, "range": Array [ - 25, - 26, + 20, + 21, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 10, "line": 2, }, "start": Object { - "column": 14, + "column": 9, "line": 2, }, }, "range": Array [ - 26, - 33, + 21, + 22, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 12, "line": 2, }, "start": Object { - "column": 22, + "column": 11, "line": 2, }, }, "range": Array [ - 34, - 43, + 23, + 24, ], - "type": "Identifier", - "value": "firstName", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 16, "line": 2, }, "start": Object { - "column": 31, + "column": 13, "line": 2, }, }, "range": Array [ - 43, - 44, + 25, + 28, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 17, "line": 2, }, "start": Object { - "column": 33, + "column": 16, "line": 2, }, }, "range": Array [ - 45, - 51, + 28, + 29, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 18, "line": 2, }, "start": Object { - "column": 39, + "column": 17, "line": 2, }, }, "range": Array [ - 51, - 52, + 29, + 30, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 19, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 18, + "line": 2, }, }, "range": Array [ - 67, - 74, + 30, + 31, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 3, + "column": 21, + "line": 2, }, "start": Object { - "column": 22, - "line": 3, + "column": 20, + "line": 2, }, }, "range": Array [ - 75, - 83, + 32, + 33, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 3, + "column": 22, + "line": 2, }, "start": Object { - "column": 31, - "line": 3, + "column": 21, + "line": 2, }, }, "range": Array [ - 84, - 92, + 33, + 34, ], - "type": "Identifier", - "value": "lastName", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 1, "line": 3, }, "start": Object { - "column": 39, + "column": 0, "line": 3, }, }, "range": Array [ - 92, - 93, + 35, + 36, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, - "start": Object { - "column": 41, - "line": 3, + "range": Array [ + 25, + 29, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 94, - 100, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + }, ], - "type": "Identifier", - "value": "string", - }, - Object { "loc": Object { "end": Object { - "column": 48, + "column": 1, "line": 3, }, "start": Object { - "column": 47, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 100, - 101, + 0, + 29, ], - "type": "Punctuator", - "value": ",", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 14, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 116, - 123, + 0, + 5, ], "type": "Keyword", - "value": "private", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 22, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 124, - 127, + 6, + 9, ], "type": "Identifier", - "value": "age", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 25, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 127, - 128, + 10, + 20, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 4, + "column": 24, + "line": 1, }, "start": Object { - "column": 27, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 129, - 135, + 21, + 24, ], "type": "Identifier", - "value": "number", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 4, + "column": 26, + "line": 1, }, "start": Object { - "column": 34, - "line": 4, + "column": 25, + "line": 1, }, }, "range": Array [ - 136, - 137, + 25, + 26, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 138, - 140, - ], - "type": "Numeric", - "value": "30", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 38, - "line": 4, + "column": 0, + "line": 3, }, }, "range": Array [ - 140, - 141, + 28, + 29, ], "type": "Punctuator", - "value": ",", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements-and-extends.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, }, - "start": Object { - "column": 14, - "line": 5, + "range": Array [ + 78, + 80, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "ClassWithParentAndInterface", + "range": Array [ + 6, + 33, + ], + "type": "Identifier", }, - "range": Array [ - 156, - 163, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "name": "MyInterface", + "range": Array [ + 45, + 56, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 56, + ], + "type": "TSClassImplements", + }, ], - "type": "Keyword", - "value": "private", - }, - Object { "loc": Object { "end": Object { - "column": 30, - "line": 5, + "column": 80, + "line": 1, }, "start": Object { - "column": 22, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 164, - 172, + 0, + 80, ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, + "superClass": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, }, + "name": "MyOtherClass", + "range": Array [ + 65, + 77, + ], + "type": "Identifier", }, - "range": Array [ - 173, - 180, - ], - "type": "Identifier", - "value": "student", + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 81, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 39, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 38, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 180, - 181, + 0, + 5, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 40, - "line": 5, + "column": 6, + "line": 1, }, }, "range": Array [ - 182, - 189, + 6, + 33, ], "type": "Identifier", - "value": "boolean", + "value": "ClassWithParentAndInterface", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 5, + "column": 44, + "line": 1, }, "start": Object { - "column": 48, - "line": 5, + "column": 34, + "line": 1, }, }, "range": Array [ - 190, - 191, + 34, + 44, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 55, - "line": 5, + "column": 56, + "line": 1, }, "start": Object { - "column": 50, - "line": 5, + "column": 45, + "line": 1, }, }, "range": Array [ - 192, - 197, + 45, + 56, ], - "type": "Boolean", - "value": "false", + "type": "Identifier", + "value": "MyInterface", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 5, + "column": 64, + "line": 1, }, "start": Object { - "column": 55, - "line": 5, + "column": 57, + "line": 1, }, }, "range": Array [ - 197, - 198, + 57, + 64, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 77, + "line": 1, }, "start": Object { - "column": 57, - "line": 5, + "column": 65, + "line": 1, }, }, "range": Array [ - 199, - 200, + 65, + 77, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "MyOtherClass", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 79, + "line": 1, }, "start": Object { - "column": 58, - "line": 5, + "column": 78, + "line": 1, }, }, "range": Array [ - 200, - 201, + 78, + 79, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 80, + "line": 1, }, "start": Object { - "column": 0, - "line": 6, + "column": 79, + "line": 1, }, }, "range": Array [ - 202, - 203, + 79, + 80, ], "type": "Punctuator", "value": "}", @@ -15490,484 +14706,141 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-protected-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-implements-generic.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 32, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 61, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 21, + "line": 1, }, }, + "name": "Bar", "range": Array [ - 14, - 209, + 21, + 24, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 59, - "line": 5, - }, - }, - "range": Array [ - 207, - 209, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 2, - }, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, - "params": Array [ - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 36, - 53, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 53, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 88, - 104, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 96, - 104, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 69, - 104, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 130, - 141, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 133, - 141, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 120, - 146, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 144, - 146, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", + "start": Object { + "column": 25, + "line": 1, }, - "range": Array [ - 120, - 146, - ], - "type": "TSParameterProperty", }, - Object { - "accessibility": "protected", + "range": Array [ + 25, + 26, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 57, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "name": "student", - "range": Array [ - 181, - 197, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 188, - 197, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "range": Array [ - 190, - 197, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 162, - 205, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 52, - "line": 5, - }, - }, - "range": Array [ - 200, - 205, - ], - "raw": "false", - "type": "Literal", - "value": false, + "column": 25, + "line": 1, }, - "type": "AssignmentPattern", }, + "name": "S", "range": Array [ - 162, - 205, + 25, + 26, ], - "readonly": true, - "type": "TSParameterProperty", + "type": "Identifier", }, - ], - "range": Array [ - 25, - 209, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 211, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", }, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -15976,7 +14849,7 @@ Object { }, "range": Array [ 0, - 211, + 32, ], "superClass": null, "type": "ClassDeclaration", @@ -15985,8 +14858,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -15995,7 +14868,7 @@ Object { }, "range": Array [ 0, - 211, + 33, ], "sourceType": "module", "tokens": Array [ @@ -16038,7 +14911,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { @@ -16048,367 +14921,447 @@ Object { }, "range": Array [ 10, - 11, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 14, - 25, + 21, + 24, ], "type": "Identifier", - "value": "constructor", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ + 25, 26, - 35, ], - "type": "Keyword", - "value": "protected", + "type": "Identifier", + "value": "S", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 36, - 45, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, + 26, + 27, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "Identifier", - "value": "string", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 53, - 54, + 28, + 29, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 1, "line": 3, }, "start": Object { - "column": 14, + "column": 0, "line": 3, }, }, "range": Array [ - 69, - 78, + 31, + 32, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements-generic-multiple.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 1, + }, }, + "range": Array [ + 31, + 35, + ], + "type": "ClassBody", }, - "range": Array [ - 79, - 87, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 88, - 96, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "S", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 24, + 30, + ], + "type": "TSTypeParameterInstantiation", + }, }, - }, - "range": Array [ - 96, - 97, ], - "type": "Punctuator", - "value": ":", - }, - Object { "loc": Object { "end": Object { - "column": 49, + "column": 1, "line": 3, }, "start": Object { - "column": 43, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 98, - 104, + 0, + 35, ], - "type": "Identifier", - "value": "string", + "superClass": null, + "type": "ClassDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ",", + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 14, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 120, - 129, + 0, + 5, ], "type": "Keyword", - "value": "protected", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 24, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 130, - 133, + 6, + 9, ], "type": "Identifier", - "value": "age", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 27, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 133, - 134, + 10, + 20, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 4, + "column": 24, + "line": 1, }, "start": Object { - "column": 29, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 135, - 141, + 21, + 24, ], "type": "Identifier", - "value": "number", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 4, + "column": 25, + "line": 1, }, "start": Object { - "column": 36, - "line": 4, + "column": 24, + "line": 1, }, }, "range": Array [ - 142, - 143, + 24, + 25, ], "type": "Punctuator", - "value": "=", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 4, + "column": 26, + "line": 1, }, "start": Object { - "column": 38, - "line": 4, + "column": 25, + "line": 1, }, }, "range": Array [ - 144, - 146, + 25, + 26, ], - "type": "Numeric", - "value": "30", + "type": "Identifier", + "value": "S", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 4, + "column": 27, + "line": 1, }, "start": Object { - "column": 40, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ - 146, - 147, + 26, + 27, ], "type": "Punctuator", "value": ",", @@ -16416,209 +15369,83 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 162, - 171, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, + "column": 29, + "line": 1, }, "start": Object { - "column": 24, - "line": 5, + "column": 28, + "line": 1, }, }, "range": Array [ - 172, - 180, + 28, + 29, ], "type": "Identifier", - "value": "readonly", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 33, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 181, - 188, + 29, + 30, ], - "type": "Identifier", - "value": "student", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 5, + "column": 32, + "line": 1, }, "start": Object { - "column": 40, - "line": 5, + "column": 31, + "line": 1, }, }, "range": Array [ - 188, - 189, + 31, + 32, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 42, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 190, - 197, + 34, + 35, ], - "type": "Identifier", - "value": "boolean", + "type": "Punctuator", + "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 52, - "line": 5, - }, - }, - "range": Array [ - 200, - 205, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 5, - }, - "start": Object { - "column": 59, - "line": 5, - }, - }, - "range": Array [ - 207, - 208, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 60, - "line": 5, - }, - }, - "range": Array [ - 208, - 209, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 210, - 211, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-public-parameter-properties.src 1`] = ` -Object { - "body": Array [ + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-method.src 1`] = ` +Object { + "body": Array [ Object { "body": Object { "body": Array [ @@ -16627,7 +15454,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -16635,18 +15462,18 @@ Object { "line": 2, }, }, - "name": "constructor", + "name": "foo", "range": Array [ - 14, - 25, + 12, + 15, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 19, + "line": 2, }, "start": Object { "column": 2, @@ -16654,8 +15481,8 @@ Object { }, }, "range": Array [ - 14, - 197, + 12, + 29, ], "static": false, "type": "MethodDefinition", @@ -16665,17 +15492,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 19, + "line": 2, }, "start": Object { - "column": 56, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 195, - 197, + 26, + 29, ], "type": "BlockStatement", }, @@ -16684,373 +15511,262 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 19, + "line": 2, }, "start": Object { - "column": 13, + "column": 5, "line": 2, }, }, - "params": Array [ - Object { - "accessibility": "public", + "params": Array [], + "range": Array [ + 15, + 29, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, + "column": 15, "line": 2, }, "start": Object { - "column": 14, + "column": 9, "line": 2, }, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 33, - 50, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSStringKeyword", - }, - }, - }, "range": Array [ - 26, - 50, + 19, + 25, ], - "type": "TSParameterProperty", + "type": "TSNumberKeyword", }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 32, + 44, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 3, }, - "parameter": Object { + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 41, + 44, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 38, + 44, + ], + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 46, + "column": 7, "line": 3, }, "start": Object { - "column": 30, + "column": 6, "line": 3, }, }, - "name": "lastName", - "range": Array [ - 82, - 98, - ], - "type": "Identifier", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 46, + "column": 7, "line": 3, }, "start": Object { - "column": 38, + "column": 6, "line": 3, }, }, + "name": "T", "range": Array [ - 90, - 98, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 92, - 98, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 66, - 98, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 121, - 132, + 36, + 37, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 124, - 132, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, }, "range": Array [ - 114, - 137, + 36, + 37, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 135, - 137, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", + "type": "TSTypeParameter", }, - "range": Array [ - 114, - 137, - ], - "type": "TSParameterProperty", + ], + "range": Array [ + 35, + 38, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "baz", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 47, + 55, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 4, }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "name": "student", - "range": Array [ - 169, - 185, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 176, - 185, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 178, - 185, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 153, - 193, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", + "start": Object { + "column": 8, + "line": 4, }, - "range": Array [ - 153, - 193, - ], - "readonly": true, - "type": "TSParameterProperty", }, - ], + "range": Array [ + 53, + 55, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "params": Array [], "range": Array [ - 25, - 197, + 50, + 55, ], "type": "FunctionExpression", }, @@ -17059,23 +15775,23 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 199, + 8, + 57, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -17083,17 +15799,17 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "C", "range": Array [ 6, - 9, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -17102,7 +15818,7 @@ Object { }, "range": Array [ 0, - 199, + 57, ], "superClass": null, "type": "ClassDeclaration", @@ -17111,7 +15827,7 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 6, }, "start": Object { @@ -17121,7 +15837,7 @@ Object { }, "range": Array [ 0, - 199, + 58, ], "sourceType": "module", "tokens": Array [ @@ -17146,7 +15862,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -17156,25 +15872,25 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -17182,7 +15898,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -17191,26 +15907,26 @@ Object { }, }, "range": Array [ - 14, - 25, + 12, + 15, ], "type": "Identifier", - "value": "constructor", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 2, }, "start": Object { - "column": 13, + "column": 5, "line": 2, }, }, "range": Array [ - 25, - 26, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -17218,1348 +15934,1219 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 7, "line": 2, }, "start": Object { - "column": 14, + "column": 6, "line": 2, }, }, "range": Array [ - 26, - 32, + 16, + 17, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 8, "line": 2, }, "start": Object { - "column": 21, + "column": 7, "line": 2, }, }, "range": Array [ - 33, - 42, + 17, + 18, ], - "type": "Identifier", - "value": "firstName", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 15, "line": 2, }, "start": Object { - "column": 30, + "column": 9, "line": 2, }, }, "range": Array [ - 42, - 43, + 19, + 25, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 17, "line": 2, }, "start": Object { - "column": 32, + "column": 16, "line": 2, }, }, "range": Array [ - 44, - 50, + 26, + 27, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 19, "line": 2, }, "start": Object { - "column": 38, + "column": 18, "line": 2, }, }, "range": Array [ - 50, - 51, + 28, + 29, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 3, }, "start": Object { - "column": 14, + "column": 2, "line": 3, }, }, "range": Array [ - 66, - 72, + 32, + 35, ], - "type": "Keyword", - "value": "public", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 6, "line": 3, }, "start": Object { - "column": 21, + "column": 5, "line": 3, }, }, "range": Array [ - 73, - 81, + 35, + 36, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 7, "line": 3, }, "start": Object { - "column": 30, + "column": 6, "line": 3, }, }, "range": Array [ - 82, - 90, + 36, + 37, ], "type": "Identifier", - "value": "lastName", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 8, "line": 3, }, "start": Object { - "column": 38, + "column": 7, "line": 3, }, }, "range": Array [ - 90, - 91, + 37, + 38, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 9, "line": 3, }, "start": Object { - "column": 40, + "column": 8, "line": 3, }, }, "range": Array [ - 92, - 98, + 38, + 39, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 10, "line": 3, }, "start": Object { - "column": 46, + "column": 9, "line": 3, }, }, "range": Array [ - 98, - 99, + 39, + 40, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 114, - 120, - ], - "type": "Keyword", - "value": "public", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 12, + "line": 3, }, "start": Object { - "column": 21, - "line": 4, + "column": 11, + "line": 3, }, }, "range": Array [ - 121, - 124, + 41, + 42, ], - "type": "Identifier", - "value": "age", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 4, + "column": 14, + "line": 3, }, "start": Object { - "column": 24, - "line": 4, + "column": 13, + "line": 3, }, }, "range": Array [ - 124, - 125, + 43, + 44, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 5, "line": 4, }, "start": Object { - "column": 26, + "column": 2, "line": 4, }, }, "range": Array [ - 126, - 132, + 47, + 50, ], "type": "Identifier", - "value": "number", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 6, "line": 4, }, "start": Object { - "column": 33, + "column": 5, "line": 4, }, }, "range": Array [ - 133, - 134, + 50, + 51, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 7, "line": 4, }, "start": Object { - "column": 35, + "column": 6, "line": 4, }, }, "range": Array [ - 135, - 137, + 51, + 52, ], - "type": "Numeric", - "value": "30", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 9, "line": 4, }, "start": Object { - "column": 37, + "column": 8, "line": 4, }, }, "range": Array [ - 137, - 138, + 53, + 54, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 153, - 159, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 160, - 168, - ], - "type": "Identifier", - "value": "readonly", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 5, + "column": 10, + "line": 4, }, "start": Object { - "column": 30, - "line": 5, + "column": 9, + "line": 4, }, }, "range": Array [ - 169, - 176, + 54, + 55, ], - "type": "Identifier", - "value": "student", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 1, "line": 5, }, "start": Object { - "column": 37, + "column": 0, "line": 5, }, }, "range": Array [ - 176, - 177, + 56, + 57, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-mixin.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 178, - 185, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 5, - }, - "start": Object { - "column": 47, - "line": 5, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 193, - 194, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-readonly-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 107, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, + "argument": Object { "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 53, - "line": 3, + "column": 33, + "line": 2, }, "start": Object { - "column": 51, - "line": 3, + "column": 30, + "line": 2, }, }, "range": Array [ - 105, - 107, + 79, + 82, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": null, "loc": Object { "end": Object { - "column": 53, - "line": 3, + "column": 33, + "line": 2, }, "start": Object { - "column": 13, + "column": 11, "line": 2, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 35, - 52, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 52, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 52, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, + "range": Array [ + 60, + 82, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 77, - 93, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 85, - 93, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 87, - 93, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 68, - 103, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "raw": "'Smith'", - "type": "Literal", - "value": "Smith", - }, - "type": "AssignmentPattern", + "start": Object { + "column": 25, + "line": 2, }, - "range": Array [ - 68, - 103, - ], - "readonly": true, - "type": "TSParameterProperty", }, - ], - "range": Array [ - 25, - 107, - ], - "type": "FunctionExpression", + "name": "Base", + "range": Array [ + 74, + 78, + ], + "type": "Identifier", + }, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 53, + 82, + ], + "type": "ReturnStatement", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 10, + "column": 47, "line": 1, }, }, "range": Array [ - 10, - 109, + 47, + 84, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "Foo", + "name": "M", "range": Array [ - 6, 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "name": "Base", + "range": Array [ + 38, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + }, + }, + }, + ], "range": Array [ 0, - 109, + 84, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 109, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 36, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Constructor", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 33, + 35, + ], + "type": "TSTypeLiteral", + }, + ], + "range": Array [ + 32, + 36, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 36, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 37, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", }, Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 5, + }, + "start": Object { + "column": 39, + "line": 5, + }, }, - "start": Object { - "column": 6, - "line": 1, + "range": Array [ + 125, + 128, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, }, + "name": "X", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", }, - "range": Array [ - 6, - 9, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "name": "I", + "range": Array [ + 123, + 124, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "range": Array [ + 123, + 124, + ], + "type": "TSClassImplements", + }, ], - "type": "Identifier", - "value": "Foo", - }, - Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 42, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 10, - 11, + 86, + 128, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, + "superClass": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 5, + }, + "start": Object { + "column": 23, + "line": 5, + }, + }, + "name": "C", + "range": Array [ + 109, + 110, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "M", + "range": Array [ + 102, + 103, + ], + "type": "Identifier", }, - "start": Object { - "column": 2, - "line": 2, + "loc": Object { + "end": Object { + "column": 25, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 102, + 111, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 18, + "line": 5, + }, + }, + "range": Array [ + 104, + 107, + ], + "type": "TSAnyKeyword", + }, + ], + "range": Array [ + 103, + 108, + ], + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", + "type": "ClassDeclaration", }, Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, }, - "start": Object { - "column": 13, - "line": 2, + "range": Array [ + 138, + 141, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, }, + "name": "C", + "range": Array [ + 136, + 137, + ], + "type": "Identifier", }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 11, + "line": 7, }, "start": Object { - "column": 14, - "line": 2, + "column": 0, + "line": 7, }, }, "range": Array [ - 26, - 34, + 130, + 141, ], - "type": "Identifier", - "value": "readonly", + "superClass": null, + "type": "ClassDeclaration", }, Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 12, + "line": 8, + }, }, - "start": Object { - "column": 23, - "line": 2, + "range": Array [ + 154, + 157, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, }, + "name": "I", + "range": Array [ + 152, + 153, + ], + "type": "Identifier", }, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 15, + "line": 8, }, "start": Object { - "column": 32, - "line": 2, + "column": 0, + "line": 8, }, }, "range": Array [ - 44, - 45, + 142, + 157, ], - "type": "Punctuator", - "value": ":", + "type": "TSInterfaceDeclaration", }, Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 5, + "line": 9, + }, }, + "name": "Constructor", + "range": Array [ + 163, + 174, + ], + "type": "Identifier", }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "string", - }, - Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 48, + "line": 9, }, "start": Object { - "column": 40, - "line": 2, + "column": 0, + "line": 9, }, }, "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 68, - 76, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 77, - 85, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 87, - 93, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "type": "String", - "value": "'Smith'", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 3, - }, - "start": Object { - "column": 51, - "line": 3, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 52, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, + 158, + 206, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 22, + "line": 9, + }, }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-readonly-property.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ + "params": Array [ Object { - "accessibility": "public", - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 34, + "line": 9, }, "start": Object { - "column": 20, - "line": 2, + "column": 30, + "line": 9, }, }, - "name": "foo", + "name": "args", "range": Array [ - 32, - 35, + 188, + 192, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 41, + "line": 9, }, "start": Object { - "column": 4, - "line": 2, + "column": 27, + "line": 9, }, }, "range": Array [ - 16, - 47, + 185, + 199, ], - "readonly": true, - "static": false, - "type": "ClassProperty", - "value": Object { + "type": "RestElement", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 41, + "line": 9, }, "start": Object { - "column": 26, - "line": 2, + "column": 34, + "line": 9, }, }, "range": Array [ - 38, - 46, + 192, + 199, ], - "raw": "'string'", - "type": "Literal", - "value": "string", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 9, + }, + "start": Object { + "column": 36, + "line": 9, + }, + }, + "range": Array [ + 194, + 197, + ], + "type": "TSAnyKeyword", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 9, + }, + "start": Object { + "column": 36, + "line": 9, + }, + }, + "range": Array [ + 194, + 199, + ], + "type": "TSArrayType", + }, }, }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + "range": Array [ + 180, + 205, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 43, + "line": 9, + }, }, - "start": Object { - "column": 10, - "line": 1, + "range": Array [ + 201, + 205, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "range": Array [ + 204, + 205, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, }, }, - "range": Array [ - 10, - 49, - ], - "type": "ClassBody", + "type": "TSConstructorType", }, - "id": Object { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 19, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 9, }, }, - "name": "Foo", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 175, + 176, + ], + "type": "Identifier", + }, + "range": Array [ + 175, + 176, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 6, - 9, + 174, + 177, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 49, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 10, }, "start": Object { "column": 0, @@ -18568,14 +17155,14 @@ Object { }, "range": Array [ 0, - 50, + 207, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -18585,28 +17172,28 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, 9, + 10, ], "type": "Identifier", - "value": "Foo", + "value": "M", }, Object { "loc": Object { @@ -18624,471 +17211,295 @@ Object { 11, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 16, - 22, + 11, + 12, ], - "type": "Keyword", - "value": "public", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 23, - 31, + 13, + 20, ], - "type": "Identifier", - "value": "readonly", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ + 21, 32, - 35, ], "type": "Identifier", - "value": "foo", + "value": "Constructor", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 36, - 37, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 34, - "line": 2, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, - }, + "column": 33, + "line": 1, + }, }, "range": Array [ - 38, - 46, + 33, + 34, ], - "type": "String", - "value": "'string'", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 35, - "line": 2, + "line": 1, }, "start": Object { "column": 34, - "line": 2, + "line": 1, }, }, "range": Array [ - 46, - 47, + 34, + 35, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 35, + "line": 1, }, }, "range": Array [ - 48, - 49, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ">", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-static-parameter-properties.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 54, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 28, - 44, - ], - "static": true, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 27, - 54, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - "range": Array [ - 10, - 56, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 36, + "line": 1, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ">", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 38, + "line": 1, }, "start": Object { - "column": 0, + "column": 37, "line": 1, }, }, "range": Array [ - 0, - 56, + 37, + 38, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, + "type": "Punctuator", + "value": "(", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "Identifier", + "value": "Base", }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 43, "line": 1, }, "start": Object { - "column": 0, + "column": 42, "line": 1, }, }, "range": Array [ - 0, - 5, + 42, + 43, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 45, "line": 1, }, "start": Object { - "column": 6, + "column": 44, "line": 1, }, }, "range": Array [ - 6, - 9, + 44, + 45, ], "type": "Identifier", - "value": "Foo", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 46, "line": 1, }, "start": Object { - "column": 10, + "column": 45, "line": 1, }, }, "range": Array [ - 10, - 11, + 45, + 46, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 48, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 47, + "line": 1, }, }, "range": Array [ - 16, - 27, + 47, + 48, ], - "type": "Identifier", - "value": "constructor", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 2, }, "start": Object { - "column": 15, + "column": 4, "line": 2, }, }, "range": Array [ - 27, - 28, + 53, + 59, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 2, }, "start": Object { - "column": 16, + "column": 11, "line": 2, }, }, "range": Array [ - 28, - 34, + 60, + 65, ], "type": "Keyword", - "value": "static", + "value": "class", }, Object { "loc": Object { @@ -19097,52 +17508,52 @@ Object { "line": 2, }, "start": Object { - "column": 23, + "column": 17, "line": 2, }, }, "range": Array [ - 35, - 36, + 66, + 73, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 29, "line": 2, }, "start": Object { - "column": 24, + "column": 25, "line": 2, }, }, "range": Array [ - 36, - 37, + 74, + 78, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Base", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 31, "line": 2, }, "start": Object { - "column": 26, + "column": 30, "line": 2, }, }, "range": Array [ - 38, - 44, + 79, + 80, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -19156,509 +17567,296 @@ Object { }, }, "range": Array [ - 44, - 45, + 81, + 82, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 46, - 47, + 83, + 84, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { - "column": 4, - "line": 4, + "column": 0, + "line": 5, }, }, "range": Array [ - 53, - 54, + 86, + 91, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 5, }, "start": Object { - "column": 0, + "column": 6, "line": 5, }, }, "range": Array [ - 55, - 56, + 92, + 93, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "X", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 15, + "line": 5, }, - "range": Array [ - 13, - 17, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 5, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, + "range": Array [ + 94, + 101, + ], + "type": "Keyword", + "value": "extends", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 5, }, }, "range": Array [ - 0, - 17, + 102, + 103, ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "M", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 0, - 5, + 103, + 104, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 21, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, + "column": 18, + "line": 5, }, }, "range": Array [ - 6, - 9, + 104, + 107, ], "type": "Identifier", - "value": "Foo", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 22, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 21, + "line": 5, }, }, "range": Array [ - 9, - 10, + 107, + 108, ], "type": "Punctuator", - "value": "<", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 22, + "line": 5, }, }, "range": Array [ - 10, - 11, + 108, + 109, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 24, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 5, }, }, "range": Array [ - 11, - 12, + 109, + 110, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 25, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 24, + "line": 5, }, }, "range": Array [ - 13, - 14, + 110, + 111, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 36, + "line": 5, }, "start": Object { - "column": 0, - "line": 3, + "column": 26, + "line": 5, }, }, "range": Array [ - 16, - 17, + 112, + 122, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "implements", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter-default.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 38, + "line": 5, }, - "range": Array [ - 19, - 23, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 37, + "line": 5, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, + "range": Array [ + 123, + 124, + ], + "type": "Identifier", + "value": "I", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 40, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 39, + "line": 5, }, }, "range": Array [ - 0, - 23, + 125, + 126, ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 5, + }, + "start": Object { + "column": 41, + "line": 5, }, - "params": Array [ - Object { - "default": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 10, - 17, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 18, - ], - "type": "TSTypeParameterDeclaration", }, + "range": Array [ + 127, + 128, + ], + "type": "Punctuator", + "value": "}", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 7, }, "start": Object { "column": 0, - "line": 1, + "line": 7, }, }, "range": Array [ - 0, - 5, + 130, + 135, ], "type": "Keyword", "value": "class", @@ -19666,331 +17864,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { "column": 6, - "line": 1, + "line": 7, }, }, "range": Array [ - 6, - 9, + 136, + 137, ], "type": "Identifier", - "value": "Foo", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 9, + "line": 7, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 9, - 10, + 138, + 139, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 7, }, "start": Object { "column": 10, - "line": 1, + "line": 7, }, }, "range": Array [ - 10, - 11, + 140, + 141, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 9, + "line": 8, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 8, }, }, "range": Array [ - 12, - 13, + 142, + 151, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 8, }, }, "range": Array [ - 14, - 17, + 152, + 153, ], "type": "Identifier", - "value": "Bar", + "value": "I", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 8, }, "start": Object { - "column": 17, - "line": 1, + "column": 12, + "line": 8, }, }, "range": Array [ - 17, - 18, + 154, + 155, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 15, + "line": 8, }, "start": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 8, }, }, "range": Array [ - 19, - 20, + 156, + 157, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 4, + "line": 9, }, "start": Object { "column": 0, - "line": 3, + "line": 9, }, }, "range": Array [ - 22, - 23, + 158, + 162, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "type", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter-underscore.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + "loc": Object { + "end": Object { + "column": 16, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "__P", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 7, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "line": 9, }, }, "range": Array [ - 6, - 7, + 163, + 174, ], "type": "Identifier", - "value": "A", + "value": "Constructor", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 17, + "line": 9, }, "start": Object { - "column": 7, - "line": 1, + "column": 16, + "line": 9, }, }, "range": Array [ - 7, - 8, + 174, + 175, ], "type": "Punctuator", "value": "<", @@ -19998,35 +18044,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 18, + "line": 9, }, "start": Object { - "column": 8, - "line": 1, + "column": 17, + "line": 9, }, }, "range": Array [ - 8, - 11, + 175, + 176, ], "type": "Identifier", - "value": "__P", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 19, + "line": 9, }, "start": Object { - "column": 11, - "line": 1, + "column": 18, + "line": 9, }, }, "range": Array [ - 11, - 12, + 176, + 177, ], "type": "Punctuator", "value": ">", @@ -20034,537 +18080,521 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 21, + "line": 9, }, "start": Object { - "column": 13, - "line": 1, + "column": 20, + "line": 9, }, }, "range": Array [ - 13, - 14, + 178, + 179, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 9, }, "start": Object { - "column": 14, - "line": 1, + "column": 22, + "line": 9, }, }, "range": Array [ - 14, - 15, + 180, + 183, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "new", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/const-enum.src 1`] = ` -Object { - "body": Array [ Object { - "const": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 27, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 26, + "line": 9, }, }, - "members": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSEnumMember", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "TSEnumMember", - }, - ], "range": Array [ - 0, - 39, + 184, + 185, ], - "type": "TSEnumDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 30, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 27, + "line": 9, }, }, "range": Array [ - 0, - 5, + 185, + 188, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 34, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 30, + "line": 9, }, }, "range": Array [ - 6, - 10, + 188, + 192, ], - "type": "Keyword", - "value": "enum", + "type": "Identifier", + "value": "args", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 35, + "line": 9, }, "start": Object { - "column": 11, - "line": 1, + "column": 34, + "line": 9, }, }, "range": Array [ - 11, - 14, + 192, + 193, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 39, + "line": 9, }, "start": Object { - "column": 15, - "line": 1, + "column": 36, + "line": 9, }, }, "range": Array [ - 15, - 16, + 194, + 197, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 40, + "line": 9, }, "start": Object { - "column": 4, - "line": 2, + "column": 39, + "line": 9, }, }, "range": Array [ - 21, - 24, + 197, + 198, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 41, + "line": 9, }, "start": Object { - "column": 8, - "line": 2, + "column": 40, + "line": 9, }, }, "range": Array [ - 25, - 26, + 198, + 199, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 42, + "line": 9, }, "start": Object { - "column": 10, - "line": 2, + "column": 41, + "line": 9, }, }, "range": Array [ - 27, - 28, + 199, + 200, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 45, + "line": 9, }, "start": Object { - "column": 11, - "line": 2, + "column": 43, + "line": 9, }, }, "range": Array [ - 28, - 29, + 201, + 203, ], "type": "Punctuator", - "value": ",", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 47, + "line": 9, }, "start": Object { - "column": 4, - "line": 3, + "column": 46, + "line": 9, }, }, "range": Array [ - 34, - 37, + 204, + 205, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 48, + "line": 9, }, "start": Object { - "column": 0, - "line": 4, + "column": 47, + "line": 9, }, }, "range": Array [ - 38, - 39, - ], + 205, + 206, + ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/declare-class-with-optional-method.src 1`] = ` +exports[`typescript fixtures/basics/class-with-mixin-reference.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 49, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "M", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, }, - "kind": "method", + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "Base", + "range": Array [ + 37, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 24, - 36, + 41, + 44, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 43, + "line": 1, }, }, - "params": Array [], "range": Array [ - 28, - 36, + 43, + 44, ], - "returnType": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 43, + "line": 1, }, }, + "name": "T", "range": Array [ - 30, - 35, + 43, + 44, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "TSAnyKeyword", - }, + "type": "Identifier", }, - "type": "TSEmptyBodyFunctionExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, }, - "range": Array [ - 18, - 38, - ], - "type": "ClassBody", - }, - "declare": true, - "id": Object { + ], + "range": Array [ + 0, + 49, + ], + "type": "FunctionDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 17, + "column": 36, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, - "name": "Foo", + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 35, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Constructor", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "M", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 32, + 35, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 35, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 14, - 17, + 10, + 36, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 38, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 3, }, "start": Object { @@ -20574,14 +18604,14 @@ Object { }, "range": Array [ 0, - 38, + 50, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { @@ -20591,350 +18621,426 @@ Object { }, "range": Array [ 0, - 7, + 8, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, - 13, + 9, + 10, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 17, + 10, + 11, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 24, - 27, + 13, + 20, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 27, - 28, + 21, + 32, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "Constructor", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 28, - 29, + 32, + 33, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 29, - 30, + 33, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 30, - 31, + 34, + 35, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 32, 35, + 36, ], - "type": "Identifier", - "value": "any", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 37, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 36, + "line": 1, }, }, "range": Array [ - 35, 36, + 37, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 41, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 37, + "line": 1, }, }, "range": Array [ 37, - 38, + 41, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "Base", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/declare-function.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "declare": true, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 42, + "column": 44, "line": 1, }, "start": Object { - "column": 0, + "column": 43, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 28, + ], + "raw": "'foo'", + "type": "Literal", + "value": "foo", }, - }, - "name": "bar", - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 2, }, }, + "optional": true, "range": Array [ - 24, - 32, + 14, + 43, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "static": false, + "type": "ClassProperty", + "value": Object { "loc": Object { "end": Object { "column": 32, - "line": 1, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 23, + "line": 2, }, }, + "name": "undefined", "range": Array [ - 26, - 32, + 33, + 42, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "range": Array [ - 0, - 42, - ], - "returnType": Object { + "range": Array [ + 8, + 45, + ], + "type": "ClassBody", + }, + "id": Object { "loc": Object { "end": Object { - "column": 41, + "column": 7, "line": 1, }, "start": Object { - "column": 33, + "column": 6, "line": 1, }, }, + "name": "X", "range": Array [ - 33, - 41, + 6, + 7, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, }, - "type": "TSDeclareFunction", + "range": Array [ + 0, + 45, + ], + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -20943,14 +19049,14 @@ Object { }, "range": Array [ 0, - 42, + 46, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -20960,15 +19066,33 @@ Object { }, "range": Array [ 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, 7, ], "type": "Identifier", - "value": "declare", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { @@ -20978,333 +19102,478 @@ Object { }, "range": Array [ 8, - 16, + 9, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 17, - 20, + 14, + 21, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 20, - 21, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 21, - 24, + 23, + 28, ], - "type": "Identifier", - "value": "bar", + "type": "String", + "value": "'foo'", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 24, - 25, + 28, + 29, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 26, - 32, + 29, + 30, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ + 31, 32, - 33, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ 33, - 34, + 42, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 35, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 35, - 41, + 42, + 43, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 41, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 41, - 42, + 44, + 45, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/destructuring-assignment.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, + "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", - "range": Array [ - 3, - 6, - ], - "type": "Identifier", }, - "kind": "init", + "name": "foo", + "optional": true, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 3, - "line": 1, + "column": 6, + "line": 2, }, }, - "method": false, + "params": Array [], "range": Array [ - 3, - 11, + 18, + 21, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { + "type": "TSEmptyBodyFunctionExpression", + }, + }, + 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", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 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": 6, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 3, - "line": 1, + "column": 10, + "line": 3, }, }, - "name": "foo", "range": Array [ - 3, - 6, + 32, + 38, ], - "type": "Identifier", + "type": "TSStringKeyword", + }, + }, + "type": "TSEmptyBodyFunctionExpression", + }, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "name": "baz", + "optional": true, + "range": Array [ + 50, + 53, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 42, + 65, + ], + "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, }, + }, + "params": Array [], + "range": Array [ + 54, + 65, + ], + "returnType": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 3, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 3, - 11, + 56, + 64, ], - "right": Object { - "elements": Array [], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 9, - 11, + 58, + 64, ], - "type": "ArrayExpression", + "type": "TSStringKeyword", }, - "type": "AssignmentPattern", }, + "type": "TSEmptyBodyFunctionExpression", }, - ], - "range": Array [ - 1, - 13, - ], - "type": "ObjectPattern", - }, + }, + ], "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 1, + "column": 10, "line": 1, }, }, - "operator": "=", "range": Array [ - 1, - 19, + 10, + 67, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", }, - "type": "AssignmentExpression", + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -21313,16 +19582,17 @@ Object { }, "range": Array [ 0, - 21, + 67, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -21331,14 +19601,14 @@ Object { }, "range": Array [ 0, - 21, + 68, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -21348,151 +19618,151 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 9, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 2, + 6, + 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 11, "line": 1, }, "start": Object { - "column": 3, + "column": 10, "line": 1, }, }, "range": Array [ - 3, - 6, + 10, + 11, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 7, - 8, + 14, + 17, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", - "value": "[", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 10, - 11, + 18, + 19, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 12, - 13, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 14, - 15, + 20, + 21, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 16, - 19, + 24, + 27, ], "type": "Identifier", "value": "bar", @@ -21500,297 +19770,509 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 19, - 20, + 27, + 28, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 20, - 21, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-assignment.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 0, - 13, + 29, + 30, ], - "type": "TSExportAssignment", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 0, - 6, + 30, + 31, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 7, - 8, + 32, + 38, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 9, - 12, + 38, + 39, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 42, + 49, + ], + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 1, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 10, + "line": 4, }, }, "range": Array [ - 12, - 13, + 50, + 53, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 58, + 64, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 64, + 65, ], "type": "Punctuator", "value": ";", }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "}", + }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/export-default-anonymous-function.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-properties.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "declaration": Object { - "async": false, - "expression": false, - "generator": false, - "id": null, + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 39, + "column": 5, "line": 2, }, "start": Object { - "column": 19, + "column": 2, "line": 2, }, }, - "params": Array [], + "name": "foo", "range": Array [ - 42, - 62, + 14, + 17, ], - "returnType": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "optional": true, + "range": Array [ + 14, + 19, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "optional": true, + "range": Array [ + 22, + 36, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 30, - "line": 2, + "column": 9, + "line": 3, }, }, "range": Array [ - 53, - 61, + 29, + 35, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, }, }, - "type": "TSDeclareFunction", + "name": "baz", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 24, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 4, }, }, + "optional": true, "range": Array [ - 27, - 62, + 39, + 61, ], - "type": "ExportDefaultDeclaration", + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 52, + 60, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, }, ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 64, + 10, + 63, ], - "type": "TSModuleBlock", + "type": "ClassBody", }, - "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 15, + "column": 6, "line": 1, }, }, + "name": "Foo", "range": Array [ - 15, - 20, + 6, + 9, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -21799,16 +20281,17 @@ Object { }, "range": Array [ 0, - 64, + 63, ], - "type": "TSModuleDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -21817,14 +20300,14 @@ Object { }, "range": Array [ 0, - 65, + 64, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -21834,61 +20317,43 @@ Object { }, "range": Array [ 0, - 7, + 5, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 14, + 6, + 9, ], "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "String", - "value": "\\"foo\\"", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 22, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -21896,107 +20361,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 27, - 33, + 14, + 17, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 6, "line": 2, }, "start": Object { - "column": 11, + "column": 5, "line": 2, }, }, "range": Array [ - 34, - 41, + 17, + 18, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 7, "line": 2, }, "start": Object { - "column": 19, + "column": 6, "line": 2, }, }, "range": Array [ - 42, - 50, + 18, + 19, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 28, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 51, - 52, + 22, + 25, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 6, + "line": 3, }, "start": Object { - "column": 29, - "line": 2, + "column": 5, + "line": 3, }, }, "range": Array [ - 52, - 53, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 30, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 53, - 54, + 27, + 28, ], "type": "Punctuator", "value": ":", @@ -22004,17 +20469,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 32, - "line": 2, + "column": 9, + "line": 3, }, }, "range": Array [ - 55, - 61, + 29, + 35, ], "type": "Identifier", "value": "string", @@ -22022,17 +20487,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 38, - "line": 2, + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 39, + 46, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, }, }, "range": Array [ + 60, 61, - 62, ], "type": "Punctuator", "value": ";", @@ -22041,16 +20614,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ + 62, 63, - 64, ], "type": "Punctuator", "value": "}", @@ -22060,100 +20633,103 @@ Object { } `; -exports[`typescript fixtures/basics/export-default-class-with-generic.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-property-undefined.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", }, - "start": Object { - "column": 24, - "line": 1, + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "optional": true, + "range": Array [ + 12, + 37, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "undefined", + "range": Array [ + 27, + 36, + ], + "type": "Identifier", }, }, - "range": Array [ - 24, - 28, - ], - "type": "ClassBody", - }, - "id": null, + ], "loc": Object { "end": Object { "column": 1, "line": 3, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 28, + 8, + 39, ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", }, + "name": "X", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, "loc": Object { "end": Object { @@ -22167,16 +20743,17 @@ Object { }, "range": Array [ 0, - 28, + 39, ], - "type": "ExportDefaultDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -22185,14 +20762,14 @@ Object { }, "range": Array [ 0, - 29, + 41, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -22202,118 +20779,154 @@ Object { }, "range": Array [ 0, - 6, + 5, ], "type": "Keyword", - "value": "export", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 14, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 20, + 8, + 9, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 20, - 21, + 12, + 19, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 21, - 22, + 20, + 23, ], "type": "Identifier", - "value": "T", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 22, 23, + 24, ], "type": "Punctuator", - "value": ">", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 24, 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 36, + ], + "type": "Keyword", + "value": "undefined", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { @@ -22327,8 +20940,8 @@ Object { }, }, "range": Array [ - 27, - 28, + 38, + 39, ], "type": "Punctuator", "value": "}", @@ -22338,140 +20951,484 @@ Object { } `; -exports[`typescript fixtures/basics/export-default-class-with-multiple-generics.src 1`] = ` +exports[`typescript fixtures/basics/class-with-private-parameter-properties.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 31, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": Object { + "name": "constructor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 201, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 59, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 57, + "line": 5, }, }, - "name": "T", "range": Array [ - 21, - 22, + 199, + 201, ], - "type": "Identifier", + "type": "BlockStatement", }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 59, + "line": 5, }, "start": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 2, }, }, - "name": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "params": Array [ + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, }, - "start": Object { - "column": 24, - "line": 1, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 34, + 51, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 43, + 51, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 45, + 51, + ], + "type": "TSStringKeyword", + }, + }, }, + "range": Array [ + 26, + 51, + ], + "type": "TSParameterProperty", }, - "name": "U", - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - }, + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 84, + 100, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 92, + 100, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 94, + 100, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 67, + 100, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 22, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 124, + 135, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "range": Array [ + 127, + 135, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 129, + 135, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 116, + 140, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 36, + "line": 4, + }, + }, + "range": Array [ + 138, + 140, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 116, + 140, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 31, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 173, + 189, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 38, + "line": 5, + }, + }, + "range": Array [ + 180, + 189, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 40, + "line": 5, + }, + }, + "range": Array [ + 182, + 189, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 156, + 197, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 50, + "line": 5, + }, + }, + "range": Array [ + 192, + 197, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 156, + 197, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], "range": Array [ - 24, 25, + 201, ], - "type": "TSTypeParameter", + "type": "FunctionExpression", }, - ], - "range": Array [ - 20, - 26, - ], - "type": "TSTypeParameterDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 203, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 0, @@ -22480,16 +21437,17 @@ Object { }, "range": Array [ 0, - 31, + 203, ], - "type": "ExportDefaultDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 1, + "line": 6, }, "start": Object { "column": 0, @@ -22498,14 +21456,14 @@ Object { }, "range": Array [ 0, - 32, + 203, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -22515,834 +21473,601 @@ Object { }, "range": Array [ 0, - 6, + 5, ], "type": "Keyword", - "value": "export", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ - 7, - 14, + 6, + 9, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, "range": Array [ - 15, - 20, + 10, + 11, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 20, - 21, + 14, + 25, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 21, - 22, + 25, + 26, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 22, - 23, + 26, + 33, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 24, - 25, + 34, + 43, ], "type": "Identifier", - "value": "U", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 31, + "line": 2, }, }, "range": Array [ - 25, - 26, + 43, + 44, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 39, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 27, - 28, + 45, + 51, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 51, + 52, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 21, "line": 3, }, "start": Object { - "column": 0, + "column": 14, "line": 3, }, }, "range": Array [ - 30, - 31, + 67, + 74, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "private", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-named-class-with-generic.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "ClassBody", + "loc": Object { + "end": Object { + "column": 30, + "line": 3, }, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "start": Object { + "column": 22, + "line": 3, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, + }, + "range": Array [ + 75, + 83, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, }, - "range": Array [ - 7, - 24, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 19, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 31, + "line": 3, }, }, + "range": Array [ + 84, + 92, + ], + "type": "Identifier", + "value": "lastName", + }, + Object { "loc": Object { "end": Object { - "column": 1, + "column": 40, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 39, + "line": 3, }, }, "range": Array [ - 0, - 24, + 92, + 93, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + "type": "Punctuator", + "value": ":", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 94, + 100, + ], + "type": "Identifier", + "value": "string", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 48, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 47, + "line": 3, }, }, "range": Array [ - 0, - 6, + 100, + 101, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 21, + "line": 4, }, "start": Object { - "column": 7, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 7, - 12, + 116, + 123, ], "type": "Keyword", - "value": "class", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 25, + "line": 4, }, "start": Object { - "column": 13, - "line": 1, + "column": 22, + "line": 4, }, }, "range": Array [ - 13, - 16, + 124, + 127, ], "type": "Identifier", - "value": "Foo", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 25, + "line": 4, }, }, "range": Array [ - 16, - 17, + 127, + 128, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 33, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 27, + "line": 4, }, }, "range": Array [ - 17, - 18, + 129, + 135, ], "type": "Identifier", - "value": "T", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 35, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 34, + "line": 4, }, }, "range": Array [ - 18, - 19, + 136, + 137, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 38, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 36, + "line": 4, }, }, "range": Array [ - 20, - 21, + 138, + 140, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "30", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 39, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 38, + "line": 4, }, }, "range": Array [ - 23, - 24, + 140, + 141, ], "type": "Punctuator", - "value": "}", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-named-class-with-multiple-generics.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "ClassBody", + "loc": Object { + "end": Object { + "column": 21, + "line": 5, }, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "start": Object { + "column": 14, + "line": 5, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 27, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "U", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + }, + "range": Array [ + 156, + 163, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 22, + "line": 5, }, }, "range": Array [ - 0, - 27, + 164, + 172, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "readonly", }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 38, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 31, + "line": 5, }, }, "range": Array [ - 0, - 6, + 173, + 180, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "student", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 39, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 38, + "line": 5, }, }, "range": Array [ - 7, - 12, + 180, + 181, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 47, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 40, + "line": 5, }, }, "range": Array [ - 13, - 16, + 182, + 189, ], "type": "Identifier", - "value": "Foo", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 49, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 48, + "line": 5, }, }, "range": Array [ - 16, - 17, + 190, + 191, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 55, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 50, + "line": 5, }, }, "range": Array [ - 17, - 18, + 192, + 197, ], - "type": "Identifier", - "value": "T", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 56, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 55, + "line": 5, }, }, "range": Array [ - 18, - 19, + 197, + 198, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "U", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 57, + "line": 5, }, }, "range": Array [ - 21, - 22, + 199, + 200, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 59, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 58, + "line": 5, }, }, "range": Array [ - 23, - 24, + 200, + 201, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 0, - "line": 3, + "line": 6, }, }, "range": Array [ - 26, - 27, + 202, + 203, ], "type": "Punctuator", "value": "}", @@ -23352,222 +22077,406 @@ Object { } `; -exports[`typescript fixtures/basics/export-named-enum.src 1`] = ` +exports[`typescript fixtures/basics/class-with-property-function.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ + "body": Object { + "body": Array [ Object { - "id": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "name": "foo", "range": Array [ - 22, - 25, + 14, + 17, ], "type": "Identifier", }, - "initializer": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 55, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 2, }, "start": Object { - "column": 10, + "column": 5, "line": 2, }, }, "range": Array [ - 28, - 29, + 17, + 32, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 19, + 32, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 32, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 25, + 32, + ], + "type": "TSBooleanKeyword", + }, + }, + "type": "TSFunctionType", + }, }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, + "value": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 50, + 54, + ], + "raw": "true", + "type": "Literal", + "value": true, }, - "start": Object { - "column": 4, - "line": 2, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 35, + 54, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 37, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 39, + 46, + ], + "type": "TSBooleanKeyword", + }, }, + "type": "ArrowFunctionExpression", }, - "range": Array [ - 22, - 29, - ], - "type": "TSEnumMember", }, Object { - "id": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 3, }, }, "name": "bar", "range": Array [ - 35, - 38, + 58, + 61, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 7, + "column": 27, "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 3, }, }, "range": Array [ - 35, - 38, + 58, + 83, ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 40, - ], - "type": "TSEnumDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 61, + 69, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 63, + 69, + ], + "type": "TSStringKeyword", + }, + }, + "value": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "name": "test", + "range": Array [ + 78, + 82, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 72, + 82, + ], + "type": "ArrowFunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 85, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ 0, - 6, + 85, ], - "type": "Keyword", - "value": "export", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 86, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 0, "line": 1, }, }, "range": Array [ - 7, - 11, + 0, + 5, ], "type": "Keyword", - "value": "enum", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { - "column": 12, + "column": 6, "line": 1, }, }, "range": Array [ - 12, - 15, + 6, + 9, ], "type": "Identifier", "value": "Foo", @@ -23575,17 +22484,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -23593,17 +22502,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 22, - 25, + 14, + 17, ], "type": "Identifier", "value": "foo", @@ -23611,38 +22520,56 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 2, }, "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { "column": 8, "line": 2, }, + "start": Object { + "column": 7, + "line": 2, + }, }, "range": Array [ - 26, - 27, + 19, + 20, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 2, }, "start": Object { - "column": 10, + "column": 8, "line": 2, }, }, "range": Array [ - 28, - 29, + 20, + 21, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -23651,567 +22578,247 @@ Object { "line": 2, }, "start": Object { - "column": 11, + "column": 10, "line": 2, }, }, "range": Array [ - 29, - 30, + 22, + 24, ], "type": "Punctuator", - "value": ",", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 13, + "line": 2, }, }, "range": Array [ - 35, - 38, + 25, + 32, ], "type": "Identifier", - "value": "bar", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 22, + "line": 2, }, "start": Object { - "column": 0, - "line": 4, + "column": 21, + "line": 2, }, }, "range": Array [ - 39, - 40, + 33, + 34, ], "type": "Punctuator", - "value": "}", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestAlias", - "range": Array [ - 12, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 40, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 39, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "TSNumberKeyword", - }, - ], - }, - }, "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 0, - 40, + 35, + 36, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 0, - 6, + 36, + 37, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 7, - 11, + 37, + 38, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 27, + "line": 2, }, }, "range": Array [ - 12, - 21, + 39, + 46, ], "type": "Identifier", - "value": "TestAlias", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 22, - 23, + 47, + 49, ], "type": "Punctuator", - "value": "=", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 42, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 24, - 30, + 50, + 54, ], - "type": "Identifier", - "value": "string", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 43, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 42, + "line": 2, }, }, "range": Array [ - 31, - 32, + 54, + 55, ], "type": "Punctuator", - "value": "|", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 33, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 33, - 39, + 58, + 61, ], "type": "Identifier", - "value": "number", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 39, - 40, + 61, + 62, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-type-class-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestClassProps", - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 51, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "count", - "range": Array [ - 35, - 40, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 29, - 50, - ], - "type": "TSTypeLiteral", - }, - }, "loc": Object { "end": Object { - "column": 2, + "column": 13, "line": 3, }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, "start": Object { "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "line": 3, }, }, "range": Array [ - 12, - 26, + 63, + 69, ], "type": "Identifier", - "value": "TestClassProps", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 27, - 28, + 70, + 71, ], "type": "Punctuator", "value": "=", @@ -24219,300 +22826,566 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 29, - 30, + 72, + 73, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 18, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 3, }, }, "range": Array [ - 35, - 40, + 73, + 74, ], - "type": "Identifier", - "value": "count", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 21, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 19, + "line": 3, }, }, "range": Array [ - 40, - 41, + 75, + 77, ], "type": "Punctuator", - "value": ":", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 26, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 22, + "line": 3, }, }, "range": Array [ - 42, - 48, + 78, + 82, ], "type": "Identifier", - "value": "number", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 27, "line": 3, }, "start": Object { - "column": 0, + "column": 26, "line": 3, }, }, "range": Array [ - 49, - 50, + 82, + 83, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 1, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ - 50, - 51, + 84, + 85, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` +exports[`typescript fixtures/basics/class-with-property-values.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestCallback", - "range": Array [ - 12, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 47, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "params": Array [ - Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 3, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 2, }, }, "name": "a", "range": Array [ - 28, - 37, + 14, + 15, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSNumberKeyword", + "start": Object { + "column": 6, + "line": 2, }, }, + "range": Array [ + 18, + 19, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", }, - ], - "range": Array [ - 27, - 46, - ], - "returnType": Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 39, - 46, + 23, + 30, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "static": false, + "type": "ClassProperty", + "value": Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 42, - "line": 1, + "column": 6, + "line": 3, }, }, + "properties": Array [], "range": Array [ - 42, - 46, + 27, + 29, ], - "type": "TSVoidKeyword", + "type": "ObjectExpression", }, }, - "type": "TSFunctionType", - }, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "c", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 33, + 40, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 37, + 39, + ], + "type": "ArrayExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "d", + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 43, + 50, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 47, + 49, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "name": "e", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 53, + 80, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "arguments": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, + }, + "properties": Array [], + "range": Array [ + 68, + 70, + ], + "type": "ObjectExpression", + }, + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 6, + }, + "start": Object { + "column": 21, + "line": 6, + }, + }, + "range": Array [ + 72, + 74, + ], + "type": "ArrayExpression", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 25, + "line": 6, + }, + }, + "range": Array [ + 76, + 77, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 67, + 78, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 6, + }, + }, + "name": "Array", + "range": Array [ + 61, + 66, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "range": Array [ + 57, + 79, + ], + "type": "NewExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 82, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 47, + 83, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -24522,61 +23395,79 @@ Object { }, "range": Array [ 0, - 6, + 5, ], "type": "Keyword", - "value": "export", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ - 7, - 11, + 6, + 9, ], "type": "Identifier", - "value": "type", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 24, + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, ], "type": "Identifier", - "value": "TestCallback", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 25, - 26, + 16, + 17, ], "type": "Punctuator", "value": "=", @@ -24584,370 +23475,377 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 27, - 28, + 18, + 19, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 28, - 29, + 23, + 24, ], "type": "Identifier", - "value": "a", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 29, - 30, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 31, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 31, - 37, + 27, + 28, ], - "type": "Identifier", - "value": "number", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 37, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 37, - 38, + 28, + 29, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 39, - 41, + 29, + 30, ], "type": "Punctuator", - "value": "=>", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 42, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 42, - 46, + 33, + 34, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 46, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 46, - 47, + 35, + 36, ], "type": "Punctuator", - "value": ";", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-await.src 1`] = ` -Object { - "body": Array [ Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "future", - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 46, - ], - "type": "AwaitExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 47, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, }, - "range": Array [ - 28, - 49, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 4, }, - "name": "hope", - "range": Array [ - 15, - 19, - ], - "type": "Identifier", }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "]", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 9, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 4, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "future", - "range": Array [ - 20, - 26, - ], - "type": "Identifier", + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, }, + }, + "range": Array [ + 45, + 46, ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, "range": Array [ - 0, + 47, 49, ], - "type": "FunctionDeclaration", + "type": "String", + "value": "\\"\\"", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ";", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "e", }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 0, - 5, + 55, + 56, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 9, + "line": 6, }, "start": Object { "column": 6, - "line": 1, + "line": 6, }, }, "range": Array [ - 6, - 14, + 57, + 60, ], "type": "Keyword", - "value": "function", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 15, + "line": 6, }, "start": Object { - "column": 15, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 15, - 19, + 61, + 66, ], "type": "Identifier", - "value": "hope", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 16, + "line": 6, }, "start": Object { - "column": 19, - "line": 1, + "column": 15, + "line": 6, }, }, "range": Array [ - 19, - 20, + 66, + 67, ], "type": "Punctuator", "value": "(", @@ -24955,107 +23853,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, }, "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { "column": 20, - "line": 1, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, }, }, "range": Array [ - 20, - 26, + 70, + 71, ], - "type": "Identifier", - "value": "future", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 22, + "line": 6, }, "start": Object { - "column": 26, - "line": 1, + "column": 21, + "line": 6, }, }, "range": Array [ - 26, - 27, + 72, + 73, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 23, + "line": 6, }, "start": Object { - "column": 28, - "line": 1, + "column": 22, + "line": 6, }, }, "range": Array [ - 28, - 29, + 73, + 74, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 24, + "line": 6, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 6, }, }, "range": Array [ - 34, - 39, + 74, + 75, ], - "type": "Identifier", - "value": "await", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 6, }, "start": Object { - "column": 10, - "line": 2, + "column": 25, + "line": 6, }, }, "range": Array [ - 40, - 46, + 76, + 77, ], - "type": "Identifier", - "value": "future", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 6, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 6, }, }, "range": Array [ - 46, - 47, + 77, + 78, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 6, + }, + "start": Object { + "column": 27, + "line": 6, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 6, + }, + "start": Object { + "column": 28, + "line": 6, + }, + }, + "range": Array [ + 79, + 80, ], "type": "Punctuator", "value": ";", @@ -25064,16 +24052,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 7, }, "start": Object { "column": 0, - "line": 3, + "line": 7, }, }, "range": Array [ - 48, - 49, + 81, + 82, ], "type": "Punctuator", "value": "}", @@ -25083,520 +24071,655 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-protected-parameter-properties.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 2, }, }, - "method": false, + "name": "constructor", "range": Array [ 14, - 17, + 25, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 61, + "line": 5, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, + "start": Object { + "column": 2, + "line": 2, }, - "method": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { + }, + "range": Array [ + 14, + 209, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 61, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 59, + "line": 5, }, }, - "name": "baz", "range": Array [ - 19, - 22, + 207, + 209, ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 13, - 45, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, + "type": "BlockStatement", }, - }, - "range": Array [ - 23, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 61, + "line": 5, }, "start": Object { - "column": 25, - "line": 1, + "column": 13, + "line": 2, }, }, - "members": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "parameter": Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 24, + "line": 2, }, }, - "name": "bar", + "name": "firstName", "range": Array [ - 26, - 29, + 36, + 53, ], "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 45, + 53, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSStringKeyword", + }, + }, }, + "range": Array [ + 26, + 53, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "protected", "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 49, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 14, + "line": 3, }, }, - "optional": true, - "range": Array [ - 26, - 39, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { + "parameter": Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 49, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 33, + "line": 3, }, }, + "name": "lastName", "range": Array [ - 30, - 38, + 88, + 104, ], - "type": "TSTypeAnnotation", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 49, + "line": 3, }, "start": Object { - "column": 32, - "line": 1, + "column": 41, + "line": 3, }, }, "range": Array [ - 32, - 38, + 96, + 104, ], - "type": "TSStringKeyword", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "TSStringKeyword", + }, }, }, + "range": Array [ + 69, + 104, + ], + "readonly": true, + "type": "TSParameterProperty", }, Object { - "computed": false, - "key": Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 40, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 130, + 141, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 133, + 141, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 135, + 141, + ], + "type": "TSNumberKeyword", + }, + }, + }, "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 40, + "line": 4, }, "start": Object { - "column": 40, - "line": 1, + "column": 14, + "line": 4, }, }, - "name": "baz", "range": Array [ - 40, - 43, + 120, + 146, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 4, + }, + "start": Object { + "column": 38, + "line": 4, + }, + }, + "range": Array [ + 144, + 146, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", }, + "range": Array [ + 120, + 146, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "protected", "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 57, + "line": 5, }, "start": Object { - "column": 40, - "line": 1, + "column": 14, + "line": 5, }, }, - "optional": true, - "range": Array [ - 40, - 44, - ], - "type": "TSPropertySignature", - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "TSTypeLiteral", - }, - }, - }, - ], - "range": Array [ - 0, - 51, - ], - "type": "FunctionDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 33, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 181, + 197, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 40, + "line": 5, + }, + }, + "range": Array [ + 188, + 197, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 42, + "line": 5, + }, + }, + "range": Array [ + 190, + 197, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 162, + 205, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 52, + "line": 5, + }, + }, + "range": Array [ + 200, + 205, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 162, + 205, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 25, + 209, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 211, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 12, + 0, + 211, ], - "type": "Identifier", - "value": "foo", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 211, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 13, + "column": 6, "line": 1, }, }, "range": Array [ - 13, - 14, + 6, + 9, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, "range": Array [ 14, - 17, + 25, ], "type": "Identifier", - "value": "bar", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 17, - 18, + 25, + 26, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 19, - 22, + 26, + 35, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 22, - 23, + 36, + 45, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 23, - 24, + 45, + 46, ], "type": "Punctuator", "value": ":", @@ -25604,71 +24727,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 25, - 26, + 47, + 53, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 23, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 26, - 29, + 69, + 78, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 79, + 87, ], "type": "Identifier", - "value": "bar", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 41, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 33, + "line": 3, }, }, "range": Array [ - 29, - 30, + 88, + 96, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "lastName", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 42, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 41, + "line": 3, }, }, "range": Array [ - 30, - 31, + 96, + 97, ], "type": "Punctuator", "value": ":", @@ -25676,17 +24835,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 49, + "line": 3, }, "start": Object { - "column": 32, - "line": 1, + "column": 43, + "line": 3, }, }, "range": Array [ - 32, - 38, + 98, + 104, ], "type": "Identifier", "value": "string", @@ -25694,17 +24853,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 50, + "line": 3, }, "start": Object { - "column": 38, - "line": 1, + "column": 49, + "line": 3, }, }, "range": Array [ - 38, - 39, + 104, + 105, ], "type": "Punctuator", "value": ",", @@ -25712,2150 +24871,1413 @@ Object { Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 23, + "line": 4, }, "start": Object { - "column": 40, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 40, - 43, + 120, + 129, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 130, + 133, ], "type": "Identifier", - "value": "baz", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 28, + "line": 4, }, "start": Object { - "column": 43, - "line": 1, + "column": 27, + "line": 4, }, }, "range": Array [ - 43, - 44, + 133, + 134, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 35, + "line": 4, }, "start": Object { - "column": 44, - "line": 1, + "column": 29, + "line": 4, }, }, "range": Array [ - 44, - 45, + 135, + 141, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 37, + "line": 4, }, "start": Object { - "column": 45, - "line": 1, + "column": 36, + "line": 4, }, }, "range": Array [ - 45, - 46, + 142, + 143, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 40, + "line": 4, }, "start": Object { - "column": 47, - "line": 1, + "column": 38, + "line": 4, }, }, "range": Array [ - 47, - 48, + 144, + 146, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "30", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 41, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 40, + "line": 4, }, }, "range": Array [ - 50, - 51, + 146, + 147, ], "type": "Punctuator", - "value": "}", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 13, - 43, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 43, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 38, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "TSPropertySignature", - }, - ], - "range": Array [ - 25, - 43, - ], - "type": "TSTypeLiteral", - }, - }, - }, - ], - "range": Array [ - 0, - 49, - ], - "type": "FunctionDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 23, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 0, - 8, + 162, + 171, ], "type": "Keyword", - "value": "function", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 32, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 24, + "line": 5, }, }, "range": Array [ - 9, - 12, + 172, + 180, ], "type": "Identifier", - "value": "foo", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 40, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 33, + "line": 5, }, }, "range": Array [ - 12, - 13, + 181, + 188, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "student", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 41, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 40, + "line": 5, }, }, "range": Array [ - 13, - 14, + 188, + 189, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 49, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 42, + "line": 5, }, }, "range": Array [ - 14, - 17, + 190, + 197, ], "type": "Identifier", - "value": "bar", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 51, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 50, + "line": 5, }, }, "range": Array [ - 17, - 18, + 198, + 199, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 57, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 52, + "line": 5, }, }, "range": Array [ - 19, - 22, + 200, + 205, ], - "type": "Identifier", - "value": "baz", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 57, + "line": 5, }, }, "range": Array [ - 22, - 23, + 205, + 206, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 60, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 59, + "line": 5, }, }, "range": Array [ - 23, - 24, + 207, + 208, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 61, + "line": 5, }, "start": Object { - "column": 25, - "line": 1, + "column": 60, + "line": 5, }, }, "range": Array [ - 25, - 26, + 208, + 209, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 26, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 26, - 29, + 210, + 211, ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/class-with-public-parameter-properties.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [ Object { - "argument": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 2, }, "start": Object { - "column": 11, + "column": 2, "line": 2, }, }, - "name": "b", + "name": "constructor", "range": Array [ - 36, - 37, + 14, + 25, ], "type": "Identifier", }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 58, + "line": 5, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 29, - 38, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 40, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, + 14, + 197, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 56, + "line": 5, }, }, - "name": "X", "range": Array [ - 17, - 18, + 195, + 197, ], - "type": "Identifier", - }, - }, - }, - }, - ], - "range": Array [ - 0, - 40, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "type": "BlockStatement", }, - }, - "name": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 13, + "line": 2, }, }, - "name": "X", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "range": Array [ - 11, - 12, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 13, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ">", + "params": Array [ + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 33, + 50, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 42, + 50, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 44, + 50, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 26, + 50, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 82, + 98, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 90, + 98, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 40, + "line": 3, + }, + }, + "range": Array [ + 92, + 98, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 66, + 98, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 121, + 132, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 124, + 132, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 126, + 132, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 114, + 137, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "range": Array [ + 135, + 137, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 114, + 137, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 30, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 169, + 185, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "range": Array [ + 176, + 185, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 39, + "line": 5, + }, + }, + "range": Array [ + 178, + 185, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 153, + 193, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 49, + "line": 5, + }, + }, + "range": Array [ + 188, + 193, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 153, + 193, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 25, + 197, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 199, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 199, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 199, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 14, + "column": 5, "line": 1, }, "start": Object { - "column": 13, + "column": 0, "line": 1, }, }, "range": Array [ - 13, - 14, + 0, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { - "column": 14, + "column": 6, "line": 1, }, }, "range": Array [ - 14, - 15, + 6, + 9, ], "type": "Identifier", - "value": "b", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, "range": Array [ - 15, - 16, + 10, + 11, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 17, - 18, + 14, + 25, ], "type": "Identifier", - "value": "X", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 19, - 20, + 26, + 32, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { "column": 21, - "line": 1, + "line": 2, }, }, "range": Array [ - 21, - 22, + 33, + 42, ], "type": "Identifier", - "value": "X", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 30, + "line": 2, }, }, "range": Array [ - 23, - 24, + 42, + 43, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 38, "line": 2, }, "start": Object { - "column": 4, + "column": 32, "line": 2, }, }, "range": Array [ - 29, - 35, + 44, + 50, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 39, "line": 2, }, "start": Object { - "column": 11, + "column": 38, "line": 2, }, }, "range": Array [ - 36, - 37, + 50, + 51, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 20, + "line": 3, }, "start": Object { - "column": 12, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 37, - 38, + 66, + 72, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 29, "line": 3, }, "start": Object { - "column": 0, + "column": 21, "line": 3, }, }, "range": Array [ - 39, - 40, + 73, + 81, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "readonly", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-type-parameters-that-have-comments.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 38, + "line": 3, }, - "range": Array [ - 33, - 35, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "start": Object { + "column": 30, + "line": 3, }, - "name": "compare", - "range": Array [ - 9, - 16, - ], - "type": "Identifier", }, + "range": Array [ + 82, + 90, + ], + "type": "Identifier", + "value": "lastName", + }, + Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 39, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 38, + "line": 3, }, }, - "params": Array [], "range": Array [ - 0, - 35, + 90, + 91, ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 40, + "line": 3, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - }, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 30, - ], - "type": "TSTypeParameterDeclaration", }, + "range": Array [ + 92, + 98, + ], + "type": "Identifier", + "value": "string", }, - ], - "comments": Array [ Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 47, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 46, + "line": 3, }, }, "range": Array [ - 17, - 28, + 98, + 99, ], - "type": "Block", - "value": "comment", - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 0, - 8, + 114, + 120, ], "type": "Keyword", - "value": "function", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 21, + "line": 4, }, }, "range": Array [ - 9, - 16, + 121, + 124, ], "type": "Identifier", - "value": "compare", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 25, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 24, + "line": 4, }, }, "range": Array [ - 16, - 17, + 124, + 125, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 32, + "line": 4, }, "start": Object { - "column": 28, - "line": 1, + "column": 26, + "line": 4, }, }, "range": Array [ - 28, - 29, + 126, + 132, ], "type": "Identifier", - "value": "T", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 34, + "line": 4, }, "start": Object { - "column": 29, - "line": 1, + "column": 33, + "line": 4, }, }, "range": Array [ - 29, - 30, + 133, + 134, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 37, + "line": 4, }, "start": Object { - "column": 30, - "line": 1, + "column": 35, + "line": 4, }, }, "range": Array [ - 30, - 31, + 135, + 137, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "30", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 38, + "line": 4, }, "start": Object { - "column": 31, - "line": 1, + "column": 37, + "line": 4, }, }, "range": Array [ - 31, - 32, + 137, + 138, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 20, + "line": 5, }, "start": Object { - "column": 33, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 33, - 34, + 153, + 159, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 29, + "line": 5, }, "start": Object { - "column": 34, - "line": 1, + "column": 21, + "line": 5, }, }, "range": Array [ - 34, - 35, + 160, + 168, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "readonly", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "b", - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 37, + "line": 5, + }, + "start": Object { + "column": 30, + "line": 5, }, - "range": Array [ - 34, - 51, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "range": Array [ + 169, + 176, + ], + "type": "Identifier", + "value": "student", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", }, + "range": Array [ + 176, + 177, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 46, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 25, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "range": Array [ - 0, - 51, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 21, - 23, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "range": Array [ - 11, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 24, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "column": 39, + "line": 5, }, }, "range": Array [ - 9, - 10, + 178, + 185, ], "type": "Identifier", - "value": "a", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 48, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 47, + "line": 5, }, }, "range": Array [ - 10, - 11, + 186, + 187, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 54, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 49, + "line": 5, }, }, "range": Array [ - 11, - 12, + 188, + 193, ], - "type": "Identifier", - "value": "X", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 55, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 54, + "line": 5, }, }, "range": Array [ - 13, - 20, + 193, + 194, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 57, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 56, + "line": 5, }, }, "range": Array [ - 21, - 22, + 195, + 196, ], "type": "Punctuator", "value": "{", @@ -27863,17 +26285,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 57, + "line": 5, }, }, "range": Array [ - 22, - 23, + 196, + 197, ], "type": "Punctuator", "value": "}", @@ -27881,430 +26303,344 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - 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": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 34, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 34, - 35, + 198, + 199, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Keyword", - "value": "return", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-readonly-parameter-properties.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-types.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, "body": Object { "body": Array [ Object { - "argument": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 2, }, "start": Object { - "column": 11, + "column": 2, "line": 2, }, }, - "name": "name", + "name": "constructor", "range": Array [ - 50, - 54, + 14, + 25, ], "type": "Identifier", }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 53, + "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 43, - 55, + 14, + 107, ], - "type": "ReturnStatement", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 51, + "line": 3, + }, + }, + "range": Array [ + 105, + 107, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 35, + 52, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 44, + 52, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 52, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 26, + 52, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 77, + 93, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "range": Array [ + 85, + 93, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 87, + 93, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 68, + 103, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 96, + 103, + ], + "raw": "'Smith'", + "type": "Literal", + "value": "Smith", + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 68, + 103, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 25, + 107, + ], + "type": "FunctionExpression", + }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { - "column": 37, + "column": 10, "line": 1, }, }, "range": Array [ - 37, - 57, + 10, + 109, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, - "name": "message", + "name": "Foo", "range": Array [ + 6, 9, - 16, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "name", - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], "range": Array [ 0, - 57, + 109, ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - "type": "FunctionDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -28314,14 +26650,14 @@ Object { }, "range": Array [ 0, - 58, + 109, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -28331,133 +26667,133 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 9, - 16, ], "type": "Identifier", - "value": "message", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 17, - 21, + 14, + 25, ], "type": "Identifier", - "value": "name", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 21, - 22, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 22, - 28, + 26, + 34, ], "type": "Identifier", - "value": "string", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 28, - 29, + 35, + 44, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 29, - 30, + 44, + 45, ], "type": "Punctuator", "value": ":", @@ -28465,17 +26801,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 40, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 30, - 36, + 46, + 52, ], "type": "Identifier", "value": "string", @@ -28483,89 +26819,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 37, - "line": 1, + "column": 40, + "line": 2, }, }, "range": Array [ - 37, - 38, + 52, + 53, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 22, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 43, - 49, + 68, + 76, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 31, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 23, + "line": 3, }, }, "range": Array [ - 50, - 54, + 77, + 85, ], "type": "Identifier", - "value": "name", + "value": "lastName", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 32, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 31, + "line": 3, }, }, "range": Array [ - 54, - 55, + 85, + 86, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 39, "line": 3, }, "start": Object { - "column": 0, + "column": 33, "line": 3, }, }, "range": Array [ - 56, - 57, + 87, + 93, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 40, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 96, + 103, + ], + "type": "String", + "value": "'Smith'", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 3, + }, + "start": Object { + "column": 49, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 3, + }, + "start": Object { + "column": 51, + "line": 3, + }, + }, + "range": Array [ + 105, + 106, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 52, + "line": 3, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 108, + 109, ], "type": "Punctuator", "value": "}", @@ -28575,47 +27019,69 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-types-assignation.src 1`] = ` +exports[`typescript fixtures/basics/class-with-readonly-property.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [ Object { - "argument": Object { + "accessibility": "public", + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 2, }, "start": Object { - "column": 9, + "column": 20, "line": 2, }, }, - "name": "name", + "name": "foo", "range": Array [ - 89, - 93, + 32, + 35, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 14, + "column": 35, "line": 2, }, "start": Object { - "column": 2, + "column": 4, "line": 2, }, }, "range": Array [ - 82, - 94, + 16, + 47, ], - "type": "ReturnStatement", + "readonly": true, + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "raw": "'string'", + "type": "Literal", + "value": "string", + }, }, ], "loc": Object { @@ -28624,33 +27090,31 @@ Object { "line": 3, }, "start": Object { - "column": 78, + "column": 10, "line": 1, }, }, "range": Array [ - 78, - 96, + 10, + 49, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, - "name": "message", + "name": "Foo", "range": Array [ + 6, 9, - 16, ], "type": "Identifier", }, @@ -28664,317 +27128,429 @@ Object { "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + "range": Array [ + 0, + 49, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 23, + 31, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "String", + "value": "'string'", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-static-parameter-properties.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 16, + 27, + ], + "type": "Identifier", }, - }, - "name": "name", - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { + "kind": "constructor", "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "age", - "range": Array [ - 30, - 40, + 16, + 54, ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { "column": 34, - "line": 1, + "line": 2, }, }, "range": Array [ - 34, - 40, + 46, + 54, ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 46, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 46, - ], - "raw": "100", - "type": "Literal", - "value": 100, - }, - "type": "AssignmentPattern", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "name": "args", - "range": Array [ - 51, - 55, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 69, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, + "type": "BlockStatement", }, - }, - "range": Array [ - 55, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 69, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, + "column": 15, + "line": 2, }, - "name": "Array", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, }, - }, - "params": Array [ - Object { + "parameter": Object { "loc": Object { "end": Object { - "column": 68, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 62, - "line": 1, + "column": 23, + "line": 2, }, }, + "name": "a", "range": Array [ - 62, - 68, + 35, + 44, ], - "type": "TSStringKeyword", + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 44, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSStringKeyword", + }, + }, }, - ], - "range": Array [ - 61, - 69, - ], - "type": "TSTypeParameterInstantiation", - }, + "range": Array [ + 28, + 44, + ], + "static": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 27, + 54, + ], + "type": "FunctionExpression", }, }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, - ], - "range": Array [ - 0, - 96, - ], - "returnType": Object { + "range": Array [ + 10, + 56, + ], + "type": "ClassBody", + }, + "id": Object { "loc": Object { "end": Object { - "column": 77, + "column": 9, "line": 1, }, "start": Object { - "column": 70, + "column": 6, "line": 1, }, }, + "name": "Foo", "range": Array [ - 70, - 77, + 6, + 9, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "range": Array [ - 71, - 77, - ], - "type": "TSStringKeyword", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, }, }, - "type": "FunctionDeclaration", + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 8, }, "start": Object { "column": 0, @@ -28983,14 +27559,14 @@ Object { }, "range": Array [ 0, - 97, + 59, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -29000,151 +27576,133 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 9, - 16, ], "type": "Identifier", - "value": "message", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 17, - 21, + 16, + 27, ], "type": "Identifier", - "value": "name", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 21, - 22, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ 28, - 29, + 34, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 30, - 33, + 35, + 36, ], "type": "Identifier", - "value": "age", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 33, - 34, + 36, + 37, ], "type": "Punctuator", "value": ":", @@ -29152,1015 +27710,1007 @@ Object { Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 34, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 34, - 40, + 38, + 44, ], "type": "Identifier", - "value": "number", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 41, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 41, - 42, + 44, + 45, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 43, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 43, 46, + 47, ], - "type": "Numeric", - "value": "100", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, - }, + "column": 5, + "line": 4, + }, "start": Object { - "column": 46, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 46, - 47, + 53, + 54, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 51, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 48, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 48, - 51, + 55, + 56, ], "type": "Punctuator", - "value": "...", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-two-methods-computed-constructor.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 25, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 44, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 39, + 44, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 28, + 44, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "range": Array [ + 26, + 27, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 25, + 28, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 49, + 62, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 48, + 82, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 31, + "line": 5, + }, + }, + "range": Array [ + 77, + 82, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 20, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 66, + 82, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 68, + 76, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 5, + }, + "start": Object { + "column": 24, + "line": 5, + }, + }, + "range": Array [ + 70, + 76, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 18, + "line": 5, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 18, + "line": 5, + }, + }, + "name": "T", + "range": Array [ + 64, + 65, + ], + "type": "Identifier", + }, + "range": Array [ + 64, + 65, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 63, + 66, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 84, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 7, }, "start": Object { - "column": 51, + "column": 0, "line": 1, }, }, "range": Array [ - 51, - 55, + 0, + 84, ], - "type": "Identifier", - "value": "args", + "superClass": null, + "type": "ClassDeclaration", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 2, + "line": 7, }, "start": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 55, - 56, + 84, + 85, ], - "type": "Punctuator", - "value": ":", + "type": "EmptyStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 86, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 61, + "column": 5, "line": 1, }, "start": Object { - "column": 56, + "column": 0, "line": 1, }, }, "range": Array [ - 56, - 61, + 0, + 5, ], - "type": "Identifier", - "value": "Array", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 62, + "column": 7, "line": 1, }, "start": Object { - "column": 61, + "column": 6, "line": 1, }, }, "range": Array [ - 61, - 62, + 6, + 7, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 68, + "column": 9, "line": 1, }, "start": Object { - "column": 62, + "column": 8, "line": 1, }, }, "range": Array [ - 62, - 68, + 8, + 9, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 69, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 68, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 68, - 69, + 12, + 25, ], - "type": "Punctuator", - "value": ">", + "type": "String", + "value": "\\"constructor\\"", }, Object { "loc": Object { "end": Object { - "column": 70, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 69, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 69, - 70, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 71, - "line": 1, - }, + "column": 17, + "line": 2, + }, "start": Object { - "column": 70, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 70, - 71, + 26, + 27, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 77, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 71, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 71, - 77, + 28, + 29, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 79, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 78, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 78, - 79, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 21, "line": 2, }, "start": Object { - "column": 2, + "column": 20, "line": 2, }, }, "range": Array [ - 82, - 88, + 30, + 31, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 2, }, "start": Object { - "column": 9, + "column": 22, "line": 2, }, }, "range": Array [ - 89, - 93, + 32, + 38, ], "type": "Identifier", - "value": "name", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 30, "line": 2, }, "start": Object { - "column": 13, + "column": 29, "line": 2, }, }, "range": Array [ - 93, - 94, + 39, + 40, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 3, }, "start": Object { - "column": 0, + "column": 2, "line": 3, }, }, "range": Array [ - 95, - 96, + 43, + 44, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/import-type.src 1`] = ` -Object { - "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 0, - 28, + 48, + 49, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "isTypeOf": true, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "raw": "'A'", - "type": "Literal", - "value": "A", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "TSLiteralType", - }, - "qualifier": null, - "range": Array [ - 9, - 27, - ], - "type": "TSImportType", - "typeParameters": null, - }, + "type": "Punctuator", + "value": "[", }, Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "B", - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 16, + "line": 5, }, "start": Object { - "column": 0, - "line": 2, + "column": 3, + "line": 5, }, }, "range": Array [ - 29, - 55, + 49, + 62, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "isTypeOf": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"B\\"", - "type": "Literal", - "value": "B", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "X", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", + "type": "String", + "value": "\\"constructor\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, }, - "range": Array [ - 38, - 54, - ], - "type": "TSImportType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "Y", - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterInstantiation", + "start": Object { + "column": 16, + "line": 5, }, }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "]", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 5, }, }, "range": Array [ - 0, - 4, + 63, + 64, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 19, + "line": 5, }, "start": Object { - "column": 5, - "line": 1, + "column": 18, + "line": 5, }, }, "range": Array [ - 5, - 6, + 64, + 65, ], "type": "Identifier", - "value": "A", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 19, + "line": 5, }, }, "range": Array [ - 7, - 8, + 65, + 66, ], "type": "Punctuator", - "value": "=", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 21, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 20, + "line": 5, }, }, "range": Array [ - 9, - 15, + 66, + 67, ], - "type": "Keyword", - "value": "typeof", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 22, - "line": 1, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 21, + "line": 5, }, }, "range": Array [ - 16, - 22, + 67, + 68, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 5, }, "start": Object { "column": 22, - "line": 1, + "line": 5, }, }, "range": Array [ - 22, - 23, + 68, + 69, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 30, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 24, + "line": 5, }, }, "range": Array [ - 23, - 26, + 70, + 76, ], - "type": "String", - "value": "'A'", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 32, + "line": 5, }, "start": Object { - "column": 26, - "line": 1, + "column": 31, + "line": 5, }, }, "range": Array [ - 26, - 27, + 77, + 78, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 27, - "line": 1, + "column": 2, + "line": 6, }, }, "range": Array [ - 27, - 28, + 81, + 82, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 7, }, "start": Object { "column": 0, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "String", - "value": "\\"B\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "value": "Y", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, + "line": 7, }, }, "range": Array [ - 53, - 54, + 83, + 84, ], "type": "Punctuator", - "value": ">", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 2, + "line": 7, }, "start": Object { - "column": 25, - "line": 2, + "column": 1, + "line": 7, }, }, "range": Array [ - 54, - 55, + 84, + 85, ], "type": "Punctuator", "value": ";", @@ -30170,32 +28720,50 @@ Object { } `; -exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-reference.src 1`] = ` +exports[`typescript fixtures/basics/class-with-type-parameter.src 1`] = ` Object { "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 17, + ], + "type": "ClassBody", + }, "id": Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, - "name": "X", + "name": "Foo", "range": Array [ - 5, 6, + 9, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -30204,13 +28772,14 @@ Object { }, "range": Array [ 0, - 30, + 17, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 29, + "column": 12, "line": 1, }, "start": Object { @@ -30218,156 +28787,48 @@ Object { "line": 1, }, }, - "range": Array [ - 9, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "isTypeOf": false, + "name": Object { "loc": Object { "end": Object { - "column": 28, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, + "name": "T", "range": Array [ + 10, 11, - 28, ], - "type": "TSImportType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 23, - 28, - ], - "type": "TSTypeParameterInstantiation", - }, + "type": "Identifier", }, - ], - "range": Array [ - 10, - 29, - ], - "type": "TSTypeParameterInstantiation", - }, + "range": Array [ + 10, + 11, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 9, + 12, + ], + "type": "TSTypeParameterDeclaration", }, }, ], @@ -30375,7 +28836,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -30384,14 +28845,14 @@ Object { }, "range": Array [ 0, - 31, + 18, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { @@ -30401,46 +28862,28 @@ Object { }, "range": Array [ 0, - 4, + 5, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "range": Array [ - 5, 6, + 9, ], "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", + "value": "Foo", }, Object { "loc": Object { @@ -30457,8 +28900,8 @@ Object { 9, 10, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { @@ -30475,13 +28918,13 @@ Object { 10, 11, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 1, }, "start": Object { @@ -30491,115 +28934,266 @@ Object { }, "range": Array [ 11, - 17, + 12, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, "range": Array [ - 17, - 18, + 13, + 14, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 20, + 16, + 17, ], - "type": "String", - "value": "\\"\\"", + "type": "Punctuator", + "value": "}", }, - Object { + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-type-parameter-default.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 23, ], - "type": "Punctuator", - "value": ")", + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { + "default": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 10, + 17, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 9, + 18, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 5, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 5, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 9, "line": 1, }, "start": Object { - "column": 22, + "column": 6, "line": 1, }, }, "range": Array [ - 22, - 23, + 6, + 9, ], "type": "Identifier", - "value": "B", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 10, "line": 1, }, "start": Object { - "column": 23, + "column": 9, "line": 1, }, }, "range": Array [ - 23, - 24, + 9, + 10, ], "type": "Punctuator", "value": "<", @@ -30607,53 +29201,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 10, "line": 1, }, }, "range": Array [ - 24, - 27, + 10, + 11, ], "type": "Identifier", - "value": "any", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 28, + "column": 14, "line": 1, }, }, "range": Array [ - 28, - 29, + 14, + 17, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Punctuator", "value": ">", @@ -30661,27 +29273,45 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 20, "line": 1, }, "start": Object { - "column": 29, + "column": 19, "line": 1, }, }, "range": Array [ - 29, - 30, + 19, + 20, ], "type": "Punctuator", - "value": ";", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-extends.src 1`] = ` +exports[`typescript fixtures/basics/class-with-type-parameter-underscore.src 1`] = ` Object { "body": Array [ Object { @@ -30689,79 +29319,42 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 26, + "column": 13, "line": 1, }, }, "range": Array [ - 26, - 30, + 13, + 15, ], - "type": "TSInterfaceBody", + "type": "ClassBody", }, - "extends": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - }, - ], "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, - "name": "Foo", + "name": "A", "range": Array [ - 10, - 13, + 6, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { "column": 0, @@ -30770,16 +29363,71 @@ Object { }, "range": Array [ 0, - 30, + 15, ], - "type": "TSInterfaceDeclaration", + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "__P", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 11, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 7, + 12, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -30788,14 +29436,14 @@ Object { }, "range": Array [ 0, - 31, + 16, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { @@ -30805,79 +29453,97 @@ Object { }, "range": Array [ 0, - 9, + 5, ], "type": "Keyword", - "value": "interface", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, - 13, + 6, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 8, "line": 1, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, "range": Array [ - 14, - 21, + 7, + 8, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 8, "line": 1, }, }, "range": Array [ - 22, - 25, + 8, + 11, ], "type": "Identifier", - "value": "Bar", + "value": "__P", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 12, "line": 1, }, "start": Object { - "column": 26, + "column": 11, "line": 1, }, }, "range": Array [ - 26, - 27, + 11, + 12, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, ], "type": "Punctuator", "value": "{", @@ -30885,17 +29551,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 29, - 30, + 14, + 15, ], "type": "Punctuator", "value": "}", @@ -30905,139 +29571,141 @@ Object { } `; -exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` +exports[`typescript fixtures/basics/const-enum.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], + "const": true, + "id": Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 30, + "column": 11, "line": 1, }, }, + "name": "Foo", "range": Array [ - 30, - 34, + 11, + 14, ], - "type": "TSInterfaceBody", + "type": "Identifier", }, - "extends": Array [ + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Array [ Object { - "expression": Object { + "id": Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "Bar", + "name": "foo", "range": Array [ - 22, - 25, + 21, + 24, ], "type": "Identifier", }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 22, - 25, + 21, + 28, ], - "type": "TSInterfaceHeritage", + "type": "TSEnumMember", }, Object { - "expression": Object { + "id": Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 4, + "line": 3, }, }, - "name": "Baz", + "name": "bar", "range": Array [ - 26, - 29, + 34, + 37, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 26, - 29, + 34, + 37, ], - "type": "TSInterfaceHeritage", + "type": "TSEnumMember", }, ], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, "range": Array [ 0, - 34, + 39, ], - "type": "TSInterfaceDeclaration", + "type": "TSEnumDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -31047,14 +29715,14 @@ Object { }, "range": Array [ 0, - 35, + 39, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { @@ -31064,74 +29732,92 @@ Object { }, "range": Array [ 0, - 9, + 5, ], "type": "Keyword", - "value": "interface", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 10, - 13, ], - "type": "Identifier", - "value": "Foo", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 14, - 21, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 1, }, "start": Object { - "column": 22, + "column": 15, "line": 1, }, }, "range": Array [ - 22, - 25, + 15, + 16, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 24, ], "type": "Identifier", - "value": "Bar", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ @@ -31139,58 +29825,76 @@ Object { 26, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 26, - 29, + 27, + 28, ], - "type": "Identifier", - "value": "Baz", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 30, - 31, + 28, + 29, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 3, }, "start": Object { - "column": 0, + "column": 4, "line": 3, }, }, "range": Array [ - 33, 34, + 37, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 38, + 39, ], "type": "Punctuator", "value": "}", @@ -31200,43 +29904,141 @@ Object { } `; -exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/declare-class-with-optional-method.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 24, + 36, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 28, + 36, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "TSAnyKeyword", + }, + }, + "type": "TSEmptyBodyFunctionExpression", + }, + }, + ], "loc": Object { "end": Object { "column": 1, "line": 3, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, - 21, + 18, + 38, ], - "type": "TSInterfaceBody", + "type": "ClassBody", }, + "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 17, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "name": "Foo", "range": Array [ - 10, - 13, + 14, + 17, ], "type": "Identifier", }, @@ -31252,70 +30054,17 @@ Object { }, "range": Array [ 0, - 21, + 38, ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, + "superClass": null, + "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -31324,14 +30073,14 @@ Object { }, "range": Array [ 0, - 22, + 38, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -31341,10 +30090,10 @@ Object { }, "range": Array [ 0, - 9, + 7, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { @@ -31353,1389 +30102,1854 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 13, ], - "type": "Identifier", - "value": "Foo", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 17, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { - "column": 14, + "column": 18, "line": 1, }, }, "range": Array [ - 14, - 15, + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 24, + 27, ], "type": "Identifier", - "value": "T", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 15, - 16, + 27, + 28, ], "type": "Punctuator", - "value": ">", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 17, - 18, + 28, + 29, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 20, - 21, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` -Object { + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/declare-function.src 1`] = ` +Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "baa", - "range": Array [ - 20, - 23, - ], - "type": "Identifier", + "async": false, + "declare": true, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, + }, + "name": "bar", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 20, + 24, 32, ], - "type": "TSPropertySignature", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 23, - 31, + 26, + 32, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 0, + 42, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 41, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSDeclareFunction", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 16, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "bar", + }, + 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": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/destructuring-assignment.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 3, + "line": 1, }, }, + "name": "foo", "range": Array [ - 25, - 31, + 3, + 6, ], - "type": "TSNumberKeyword", + "type": "Identifier", }, - }, - }, - Object { - "computed": false, - "key": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 3, + "line": 1, }, }, - "name": "bar", + "method": false, "range": Array [ - 37, - 40, + 3, + 11, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": true, - "range": Array [ - 37, - 50, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 41, - 49, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "TSNumberKeyword", - }, - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "bax", - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 55, - 69, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 60, - 68, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "name": "baz", - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "optional": true, - "range": Array [ - 74, - 89, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 82, - 88, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "name": "eee", - "range": Array [ - 95, - 106, - ], - "type": "Identifier", - "typeAnnotation": Object { + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { "loc": Object { "end": Object { - "column": 16, - "line": 6, + "column": 6, + "line": 1, }, "start": Object { - "column": 8, - "line": 6, + "column": 3, + "line": 1, }, }, + "name": "foo", "range": Array [ - 98, - 106, + 3, + 6, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 94, - 116, - ], - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 107, - 115, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, + "type": "Identifier", }, - "range": Array [ - 109, - 115, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "parameters": Array [ - Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 11, + "line": 1, }, "start": Object { - "column": 5, - "line": 7, + "column": 3, + "line": 1, }, }, - "name": "fff", - "optional": true, "range": Array [ - 122, - 134, + 3, + 11, ], - "type": "Identifier", - "typeAnnotation": Object { + "right": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 11, + "line": 1, }, "start": Object { "column": 9, - "line": 7, + "line": 1, }, }, "range": Array [ - 126, - 134, + 9, + 11, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 128, - 134, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 121, - 144, - ], - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "range": Array [ - 135, - 143, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, + "type": "ArrayExpression", }, - "range": Array [ - 137, - 143, - ], - "type": "TSStringKeyword", + "type": "AssignmentPattern", }, }, + ], + "range": Array [ + 1, + 13, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "doo", - "range": Array [ - 149, - 152, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 19, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, - "params": Array [], - "range": Array [ - 149, - 161, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 154, - 160, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 156, - 160, - ], - "type": "TSVoidKeyword", - }, + "start": Object { + "column": 16, + "line": 1, }, - "type": "TSMethodSignature", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "name": "doo", - "range": Array [ - 166, - 169, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, + "name": "bar", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/destructuring-assignment-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 81, + "line": 1, }, - "optional": true, - "params": Array [ - Object { + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 9, + "column": 6, + "line": 1, }, "start": Object { - "column": 9, - "line": 9, + "column": 3, + "line": 1, }, }, - "name": "a", + "name": "foo", "range": Array [ - 171, - 172, + 3, + 6, ], "type": "Identifier", }, - Object { + "kind": "init", + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 79, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 71, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 66, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 17, + 64, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 28, + 31, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 28, + 42, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 36, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 42, + ], + "right": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + ], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 26, + 44, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 58, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 49, + 57, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + ], + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 57, + ], + "type": "ArrayExpression", + }, + }, + ], + "range": Array [ + 47, + 58, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 59, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 64, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 64, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 15, + 66, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 71, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 69, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 69, + 71, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 8, + 73, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 13, - "line": 9, + "column": 79, + "line": 1, }, "start": Object { - "column": 12, - "line": 9, + "column": 8, + "line": 1, }, }, - "name": "b", "range": Array [ - 174, - 175, + 8, + 79, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 76, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 76, + 79, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", }, - Object { + }, + ], + "range": Array [ + 1, + 81, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 127, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 127, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 127, + "line": 1, + }, + "start": Object { + "column": 84, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 89, + "line": 1, }, "start": Object { - "column": 15, - "line": 9, + "column": 86, + "line": 1, }, }, - "name": "c", + "name": "foo", "range": Array [ - 177, - 178, + 86, + 89, ], "type": "Identifier", }, - ], - "range": Array [ - 166, - 186, - ], - "returnType": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 179, - 185, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 181, - 185, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "name": "loo", - "range": Array [ - 192, - 195, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "optional": true, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "name": "a", - "range": Array [ - 198, - 199, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "name": "b", - "range": Array [ - 201, - 202, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 10, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "name": "c", - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 191, - 213, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 21, - "line": 10, - }, - }, - "range": Array [ - 208, - 212, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "name": "boo", - "range": Array [ - 218, - 221, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "name": "a", - "range": Array [ - 225, - 226, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "name": "b", - "range": Array [ - 228, - 229, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "name": "c", - "range": Array [ - 231, - 232, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 218, - 240, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, + "column": 126, + "line": 1, }, "start": Object { - "column": 19, - "line": 11, + "column": 86, + "line": 1, }, }, + "method": false, "range": Array [ - 233, - 239, + 86, + 126, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 25, - "line": 11, + "column": 126, + "line": 1, }, "start": Object { - "column": 21, - "line": 11, + "column": 91, + "line": 1, }, }, - "range": Array [ - 235, - 239, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 7, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 96, + "line": 1, + }, + "start": Object { + "column": 93, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 93, + 96, + ], + "type": "Identifier", }, - }, - "name": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 9, - "line": 11, + "column": 124, + "line": 1, }, "start": Object { - "column": 8, - "line": 11, + "column": 93, + "line": 1, }, }, - "name": "J", + "method": false, "range": Array [ - 222, - 223, + 93, + 124, ], - "type": "Identifier", - }, - "range": Array [ - 222, - 223, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 221, - 224, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 124, + "line": 1, + }, + "start": Object { + "column": 98, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 1, + }, + "start": Object { + "column": 100, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 100, + 103, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 122, + "line": 1, + }, + "start": Object { + "column": 100, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 100, + 122, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 107, + "line": 1, + }, + "start": Object { + "column": 106, + "line": 1, + }, + }, + "range": Array [ + 106, + 107, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + Object { + "loc": Object { + "end": Object { + "column": 121, + "line": 1, + }, + "start": Object { + "column": 109, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 114, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 111, + 114, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 119, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 111, + 119, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 118, + "line": 1, + }, + "start": Object { + "column": 117, + "line": 1, + }, + }, + "range": Array [ + 117, + 118, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + ], + "loc": Object { + "end": Object { + "column": 119, + "line": 1, + }, + "start": Object { + "column": 116, + "line": 1, + }, + }, + "range": Array [ + 116, + 119, + ], + "type": "ArrayExpression", + }, + }, + ], + "range": Array [ + 109, + 121, + ], + "type": "ObjectExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 122, + "line": 1, + }, + "start": Object { + "column": 105, + "line": 1, + }, + }, + "range": Array [ + 105, + 122, + ], + "type": "ArrayExpression", + }, + }, + ], + "range": Array [ + 98, + 124, + ], + "type": "ObjectExpression", + }, }, - }, - "name": "a", - "range": Array [ - 250, - 251, ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "name": "b", - "optional": true, "range": Array [ - 253, - 254, + 91, + 126, ], - "type": "Identifier", - }, - ], - "range": Array [ - 245, - 265, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, + "type": "ObjectExpression", }, - "range": Array [ - 256, - 264, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 258, - 264, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "name": "a", - "range": Array [ - 278, - 279, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 281, - 282, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 270, - 293, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 284, - 292, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 286, - 292, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 9, - "line": 13, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 9, - "line": 13, - }, - }, - "name": "F", - "range": Array [ - 275, - 276, - ], - "type": "Identifier", - }, - "range": Array [ - 275, - 276, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 274, - 277, - ], - "type": "TSTypeParameterDeclaration", }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 295, - ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + ], + "range": Array [ + 84, + 127, + ], + "type": "ObjectExpression", }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 14, + "column": 129, + "line": 1, }, "start": Object { "column": 0, @@ -32744,16 +31958,16 @@ Object { }, "range": Array [ 0, - 295, + 129, ], - "type": "TSInterfaceDeclaration", + "type": "ExpressionStatement", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 16, + "line": 2, }, "start": Object { "column": 0, @@ -32762,14 +31976,14 @@ Object { }, "range": Array [ 0, - 297, + 130, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 1, "line": 1, }, "start": Object { @@ -32779,43 +31993,25 @@ Object { }, "range": Array [ 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, + 1, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 2, "line": 1, }, "start": Object { - "column": 14, + "column": 1, "line": 1, }, }, "range": Array [ - 14, - 15, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -32823,35 +32019,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 20, - 23, + 3, + 6, ], "type": "Identifier", - "value": "baa", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 23, - 24, + 6, + 7, ], "type": "Punctuator", "value": ":", @@ -32859,53 +32055,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 31, - 32, + 8, + 9, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 37, - 40, + 10, + 13, ], "type": "Identifier", "value": "bar", @@ -32913,89 +32091,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 40, - 41, + 13, + 14, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 41, - 42, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 43, - 49, + 17, + 20, ], "type": "Identifier", - "value": "number", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ - 49, - 50, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 55, - 56, + 22, + 23, ], "type": "Punctuator", "value": "[", @@ -33003,107 +32181,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 24, + "line": 1, }, "start": Object { - "column": 5, - "line": 4, + "column": 23, + "line": 1, }, }, "range": Array [ - 56, - 59, + 23, + 24, ], "type": "Identifier", - "value": "bax", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 24, + "line": 1, }, }, "range": Array [ - 59, - 60, + 24, + 25, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 4, + "column": 27, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ - 60, - 61, + 26, + 27, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 31, + "line": 1, }, "start": Object { - "column": 11, - "line": 4, + "column": 28, + "line": 1, }, }, "range": Array [ - 62, - 68, + 28, + 31, ], "type": "Identifier", - "value": "string", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 32, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 31, + "line": 1, }, }, "range": Array [ - 68, - 69, + 31, + 32, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 34, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 33, + "line": 1, }, }, "range": Array [ - 74, - 75, + 33, + 34, ], "type": "Punctuator", "value": "[", @@ -33111,35 +32289,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 35, + "line": 1, }, "start": Object { - "column": 5, - "line": 5, + "column": 34, + "line": 1, }, }, "range": Array [ - 75, - 78, + 34, + 35, ], "type": "Identifier", - "value": "baz", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 36, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 35, + "line": 1, }, }, "range": Array [ - 78, - 79, + 35, + 36, ], "type": "Punctuator", "value": "]", @@ -33147,1151 +32325,1305 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 38, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 37, + "line": 1, }, }, "range": Array [ - 79, - 80, + 37, + 38, ], "type": "Punctuator", - "value": "?", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { - "column": 10, - "line": 5, + "column": 39, + "line": 1, }, }, "range": Array [ - 80, - 81, + 39, + 40, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 41, + "line": 1, }, "start": Object { - "column": 12, - "line": 5, + "column": 40, + "line": 1, }, }, "range": Array [ - 82, - 88, + 40, + 41, ], - "type": "Identifier", - "value": "string", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 42, + "line": 1, }, "start": Object { - "column": 18, - "line": 5, + "column": 41, + "line": 1, }, }, "range": Array [ - 88, - 89, + 41, + 42, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 6, + "column": 44, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 43, + "line": 1, }, }, "range": Array [ - 94, - 95, + 43, + 44, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 46, + "line": 1, }, "start": Object { - "column": 5, - "line": 6, + "column": 45, + "line": 1, }, }, "range": Array [ - 95, - 98, + 45, + 46, ], - "type": "Identifier", - "value": "eee", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 48, + "line": 1, }, "start": Object { - "column": 8, - "line": 6, + "column": 47, + "line": 1, }, }, "range": Array [ - 98, - 99, + 47, + 48, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 6, + "column": 52, + "line": 1, }, "start": Object { - "column": 10, - "line": 6, + "column": 49, + "line": 1, }, }, "range": Array [ - 100, - 106, + 49, + 52, ], "type": "Identifier", - "value": "number", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 53, + "line": 1, }, "start": Object { - "column": 16, - "line": 6, + "column": 52, + "line": 1, }, }, "range": Array [ - 106, - 107, + 52, + 53, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 6, + "column": 55, + "line": 1, }, "start": Object { - "column": 17, - "line": 6, + "column": 54, + "line": 1, }, }, "range": Array [ - 107, - 108, + 54, + 55, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 6, + "column": 56, + "line": 1, }, "start": Object { - "column": 19, - "line": 6, + "column": 55, + "line": 1, }, }, "range": Array [ - 109, - 115, + 55, + 56, ], - "type": "Identifier", - "value": "string", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 6, + "column": 57, + "line": 1, }, "start": Object { - "column": 25, - "line": 6, + "column": 56, + "line": 1, }, }, "range": Array [ - 115, - 116, + 56, + 57, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 58, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 57, + "line": 1, }, }, "range": Array [ - 121, - 122, + 57, + 58, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 59, + "line": 1, }, "start": Object { - "column": 5, - "line": 7, + "column": 58, + "line": 1, }, }, "range": Array [ - 122, - 125, + 58, + 59, ], - "type": "Identifier", - "value": "fff", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 61, + "line": 1, }, "start": Object { - "column": 8, - "line": 7, + "column": 60, + "line": 1, }, }, "range": Array [ - 125, - 126, + 60, + 61, ], "type": "Punctuator", - "value": "?", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 63, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 62, + "line": 1, }, }, "range": Array [ - 126, - 127, + 62, + 63, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 64, + "line": 1, }, "start": Object { - "column": 11, - "line": 7, + "column": 63, + "line": 1, }, }, "range": Array [ - 128, - 134, + 63, + 64, ], - "type": "Identifier", - "value": "number", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 7, + "column": 66, + "line": 1, }, "start": Object { - "column": 17, - "line": 7, + "column": 65, + "line": 1, }, }, "range": Array [ - 134, - 135, + 65, + 66, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 68, + "line": 1, }, "start": Object { - "column": 18, - "line": 7, + "column": 67, + "line": 1, }, }, "range": Array [ - 135, - 136, + 67, + 68, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 7, + "column": 70, + "line": 1, }, "start": Object { - "column": 20, - "line": 7, + "column": 69, + "line": 1, }, }, "range": Array [ - 137, - 143, + 69, + 70, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 7, + "column": 71, + "line": 1, }, "start": Object { - "column": 26, - "line": 7, + "column": 70, + "line": 1, }, }, "range": Array [ - 143, - 144, + 70, + 71, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 73, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 72, + "line": 1, }, }, "range": Array [ - 149, - 152, + 72, + 73, ], - "type": "Identifier", - "value": "doo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 8, + "column": 75, + "line": 1, }, "start": Object { - "column": 7, - "line": 8, + "column": 74, + "line": 1, }, }, "range": Array [ - 152, - 153, + 74, + 75, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "column": 77, + "line": 1, }, "start": Object { - "column": 8, - "line": 8, + "column": 76, + "line": 1, }, }, "range": Array [ - 153, - 154, + 76, + 77, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 79, + "line": 1, }, "start": Object { - "column": 9, - "line": 8, + "column": 78, + "line": 1, }, }, "range": Array [ - 154, - 155, + 78, + 79, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 81, + "line": 1, }, "start": Object { - "column": 11, - "line": 8, + "column": 80, + "line": 1, }, }, "range": Array [ - 156, - 160, + 80, + 81, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 8, + "column": 83, + "line": 1, }, "start": Object { - "column": 15, - "line": 8, + "column": 82, + "line": 1, }, }, "range": Array [ - 160, - 161, + 82, + 83, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 9, + "column": 85, + "line": 1, }, "start": Object { - "column": 4, - "line": 9, + "column": 84, + "line": 1, }, }, "range": Array [ - 166, - 169, + 84, + 85, ], - "type": "Identifier", - "value": "doo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 9, + "column": 89, + "line": 1, }, "start": Object { - "column": 7, - "line": 9, + "column": 86, + "line": 1, }, }, "range": Array [ - 169, - 170, + 86, + 89, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 9, + "column": 90, + "line": 1, }, "start": Object { - "column": 8, - "line": 9, + "column": 89, + "line": 1, }, }, "range": Array [ - 170, - 171, + 89, + 90, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 9, + "column": 92, + "line": 1, }, "start": Object { - "column": 9, - "line": 9, + "column": 91, + "line": 1, }, }, "range": Array [ - 171, - 172, + 91, + 92, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 9, + "column": 96, + "line": 1, }, "start": Object { - "column": 10, - "line": 9, + "column": 93, + "line": 1, }, }, "range": Array [ - 172, - 173, + 93, + 96, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 9, + "column": 97, + "line": 1, }, "start": Object { - "column": 12, - "line": 9, + "column": 96, + "line": 1, }, }, "range": Array [ - 174, - 175, + 96, + 97, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 9, + "column": 99, + "line": 1, }, "start": Object { - "column": 13, - "line": 9, + "column": 98, + "line": 1, }, }, "range": Array [ - 175, - 176, + 98, + 99, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 103, + "line": 1, }, "start": Object { - "column": 15, - "line": 9, + "column": 100, + "line": 1, }, }, "range": Array [ - 177, - 178, + 100, + 103, ], "type": "Identifier", - "value": "c", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "column": 104, + "line": 1, }, "start": Object { - "column": 16, - "line": 9, + "column": 103, + "line": 1, }, }, "range": Array [ - 178, - 179, + 103, + 104, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 9, + "column": 106, + "line": 1, }, "start": Object { - "column": 17, - "line": 9, + "column": 105, + "line": 1, }, }, "range": Array [ - 179, - 180, + 105, + 106, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 9, + "column": 107, + "line": 1, }, "start": Object { - "column": 19, - "line": 9, + "column": 106, + "line": 1, }, }, "range": Array [ - 181, - 185, + 106, + 107, ], - "type": "Keyword", - "value": "void", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 9, + "column": 108, + "line": 1, }, "start": Object { - "column": 23, - "line": 9, + "column": 107, + "line": 1, }, }, "range": Array [ - 185, - 186, + 107, + 108, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 10, + "column": 110, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 109, + "line": 1, }, }, "range": Array [ - 191, - 192, + 109, + 110, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 10, + "column": 114, + "line": 1, }, "start": Object { - "column": 5, - "line": 10, + "column": 111, + "line": 1, }, }, "range": Array [ - 192, - 195, + 111, + 114, ], "type": "Identifier", - "value": "loo", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 115, + "line": 1, }, "start": Object { - "column": 8, - "line": 10, + "column": 114, + "line": 1, }, }, "range": Array [ - 195, - 196, + 114, + 115, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 117, + "line": 1, }, "start": Object { - "column": 9, - "line": 10, + "column": 116, + "line": 1, }, }, "range": Array [ - 196, - 197, + 116, + 117, ], "type": "Punctuator", - "value": "?", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 10, + "column": 118, + "line": 1, }, "start": Object { - "column": 10, - "line": 10, + "column": 117, + "line": 1, }, }, "range": Array [ - 197, - 198, + 117, + 118, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 10, + "column": 119, + "line": 1, }, "start": Object { - "column": 11, - "line": 10, + "column": 118, + "line": 1, }, }, "range": Array [ - 198, - 199, + 118, + 119, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 10, + "column": 121, + "line": 1, }, "start": Object { - "column": 12, - "line": 10, + "column": 120, + "line": 1, }, }, "range": Array [ - 199, - 200, + 120, + 121, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 10, + "column": 122, + "line": 1, }, "start": Object { - "column": 14, - "line": 10, + "column": 121, + "line": 1, }, }, "range": Array [ - 201, - 202, + 121, + 122, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 10, + "column": 124, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 123, + "line": 1, }, }, "range": Array [ - 202, - 203, + 123, + 124, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 10, + "column": 126, + "line": 1, }, "start": Object { - "column": 17, - "line": 10, + "column": 125, + "line": 1, }, }, "range": Array [ - 204, - 205, + 125, + 126, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 10, + "column": 127, + "line": 1, }, "start": Object { - "column": 18, - "line": 10, + "column": 126, + "line": 1, }, }, "range": Array [ - 205, - 206, + 126, + 127, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 10, + "column": 128, + "line": 1, }, "start": Object { - "column": 19, - "line": 10, + "column": 127, + "line": 1, }, }, "range": Array [ - 206, - 207, + 127, + 128, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 10, + "column": 129, + "line": 1, }, "start": Object { - "column": 21, - "line": 10, + "column": 128, + "line": 1, }, }, "range": Array [ - 208, - 212, + 128, + 129, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/destructuring-assignment-object.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 9, + 11, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 1, + 13, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 19, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 26, - "line": 10, + "column": 21, + "line": 1, }, "start": Object { - "column": 25, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 212, - 213, + 0, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 11, + "column": 1, + "line": 1, }, "start": Object { - "column": 4, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 218, - 221, + 0, + 1, ], - "type": "Identifier", - "value": "boo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 11, + "column": 2, + "line": 1, }, "start": Object { - "column": 7, - "line": 11, + "column": 1, + "line": 1, }, }, "range": Array [ - 221, - 222, + 1, + 2, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 11, + "column": 6, + "line": 1, }, "start": Object { - "column": 8, - "line": 11, + "column": 3, + "line": 1, }, }, "range": Array [ - 222, - 223, + 3, + 6, ], "type": "Identifier", - "value": "J", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 11, + "column": 8, + "line": 1, }, "start": Object { - "column": 9, - "line": 11, + "column": 7, + "line": 1, }, }, "range": Array [ - 223, - 224, + 7, + 8, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 11, + "column": 10, + "line": 1, }, "start": Object { - "column": 10, - "line": 11, + "column": 9, + "line": 1, }, }, "range": Array [ - 224, - 225, + 9, + 10, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 11, + "column": 11, + "line": 1, }, "start": Object { - "column": 11, - "line": 11, + "column": 10, + "line": 1, }, }, "range": Array [ - 225, - 226, + 10, + 11, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 11, + "line": 1, }, "start": Object { "column": 12, - "line": 11, + "line": 1, }, }, "range": Array [ - 226, - 227, + 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 11, + "line": 1, }, "start": Object { "column": 14, - "line": 11, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, + "line": 1, }, }, "range": Array [ - 229, - 230, + 14, + 15, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 11, + "column": 19, + "line": 1, }, "start": Object { - "column": 17, - "line": 11, + "column": 16, + "line": 1, }, }, "range": Array [ - 231, - 232, + 16, + 19, ], "type": "Identifier", - "value": "c", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 11, + "column": 20, + "line": 1, }, "start": Object { - "column": 18, - "line": 11, + "column": 19, + "line": 1, }, }, "range": Array [ - 232, - 233, + 19, + 20, ], "type": "Punctuator", "value": ")", @@ -34299,630 +33631,700 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 11, + "column": 21, + "line": 1, }, "start": Object { - "column": 19, - "line": 11, + "column": 20, + "line": 1, }, }, "range": Array [ - 233, - 234, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/destructuring-assignment-property.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 21, - "line": 11, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, }, + "range": Array [ + 33, + 37, + ], + "type": "BlockStatement", }, - "range": Array [ - 235, - 239, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 25, - "line": 11, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", }, - "range": Array [ - 239, - 240, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { - "column": 7, - "line": 12, + "column": 1, + "line": 3, }, "start": Object { - "column": 4, - "line": 12, + "column": 0, + "line": 1, }, }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 23, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 13, + 25, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 28, + 31, + ], + "type": "Identifier", + }, + "type": "AssignmentPattern", + }, + ], "range": Array [ - 245, - 248, + 0, + 37, ], - "type": "Keyword", - "value": "new", + "type": "FunctionDeclaration", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 12, + "column": 8, + "line": 1, }, "start": Object { - "column": 8, - "line": 12, + "column": 0, + "line": 1, }, }, "range": Array [ - 249, - 250, + 0, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 12, + "column": 12, + "line": 1, }, "start": Object { "column": 9, - "line": 12, + "line": 1, }, }, "range": Array [ - 250, - 251, + 9, + 12, ], "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "range": Array [ - 251, - 252, - ], - "type": "Punctuator", - "value": ",", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 12, + "line": 1, }, "start": Object { "column": 12, - "line": 12, + "line": 1, }, }, "range": Array [ - 253, - 254, + 12, + 13, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 12, + "line": 1, }, "start": Object { "column": 13, - "line": 12, - }, - }, - "range": Array [ - 254, - 255, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 14, - "line": 12, + "line": 1, }, }, "range": Array [ - 255, - 256, + 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 12, + "column": 18, + "line": 1, }, "start": Object { "column": 15, - "line": 12, - }, - }, - "range": Array [ - 256, - 257, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, + "line": 1, }, }, "range": Array [ - 258, - 264, + 15, + 18, ], "type": "Identifier", - "value": "string", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 12, + "column": 20, + "line": 1, }, "start": Object { - "column": 23, - "line": 12, + "column": 19, + "line": 1, }, }, "range": Array [ - 264, - 265, + 19, + 20, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "range": Array [ - 270, - 273, - ], - "type": "Keyword", - "value": "new", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 13, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 13, + "column": 21, + "line": 1, }, }, "range": Array [ - 274, - 275, + 21, + 22, ], "type": "Punctuator", - "value": "<", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 13, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 13, + "column": 22, + "line": 1, }, }, "range": Array [ - 275, - 276, + 22, + 23, ], - "type": "Identifier", - "value": "F", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 13, + "column": 25, + "line": 1, }, "start": Object { - "column": 10, - "line": 13, + "column": 24, + "line": 1, }, }, "range": Array [ - 276, - 277, + 24, + 25, ], "type": "Punctuator", - "value": ">", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 13, + "column": 27, + "line": 1, }, "start": Object { - "column": 11, - "line": 13, + "column": 26, + "line": 1, }, }, "range": Array [ - 277, - 278, + 26, + 27, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 13, + "column": 31, + "line": 1, }, "start": Object { - "column": 12, - "line": 13, + "column": 28, + "line": 1, }, }, "range": Array [ - 278, - 279, + 28, + 31, ], "type": "Identifier", - "value": "a", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 13, + "column": 32, + "line": 1, }, "start": Object { - "column": 13, - "line": 13, + "column": 31, + "line": 1, }, }, "range": Array [ - 279, - 280, + 31, + 32, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 13, + "column": 34, + "line": 1, }, "start": Object { - "column": 15, - "line": 13, + "column": 33, + "line": 1, }, }, "range": Array [ - 281, - 282, + 33, + 34, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 13, + "column": 1, + "line": 3, }, "start": Object { - "column": 16, - "line": 13, + "column": 0, + "line": 3, }, }, "range": Array [ - 282, - 283, + 36, + 37, ], "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 13, - }, - "start": Object { - "column": 17, - "line": 13, - }, - }, - "range": Array [ - 283, - 284, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 284, - 285, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 286, - 292, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 13, - }, - "start": Object { - "column": 26, - "line": 13, - }, - }, - "range": Array [ - 292, - 293, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 294, - 295, - ], - "type": "Punctuator", - "value": "}", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` +exports[`typescript fixtures/basics/directive-in-module.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 27, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "params": Array [ + "range": Array [ + 15, + 28, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "parameter": Object { + "id": Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 6, + "line": 3, }, }, - "name": "x", + "name": "a", "range": Array [ - 33, - 34, + 35, + 36, ], "type": "Identifier", }, - "range": Array [ - 26, - 34, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "parameter": Object { + "init": Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 27, - "line": 2, + "column": 10, + "line": 3, }, }, - "name": "y", "range": Array [ - 44, - 45, + 39, + 40, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, "range": Array [ - 36, - 45, + 35, + 40, ], - "type": "TSParameterProperty", + "type": "VariableDeclarator", }, ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, "range": Array [ - 21, - 47, + 31, + 41, ], - "type": "TSConstructSignatureDeclaration", + "type": "VariableDeclaration", + }, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 44, + 56, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 44, + 57, + ], + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 49, + 11, + 59, ], - "type": "TSInterfaceBody", + "type": "TSModuleBlock", }, "id": Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, - "name": "Test", + "name": "foo", "range": Array [ + 7, 10, - 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -34931,16 +34333,16 @@ Object { }, "range": Array [ 0, - 49, + 59, ], - "type": "TSInterfaceDeclaration", + "type": "TSModuleDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -34949,14 +34351,14 @@ Object { }, "range": Array [ 0, - 50, + 60, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -34966,43 +34368,43 @@ Object { }, "range": Array [ 0, - 9, + 6, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "module", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 10, - 14, ], "type": "Identifier", - "value": "Test", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 16, + 11, + 12, ], "type": "Punctuator", "value": "{", @@ -35010,161 +34412,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 21, - 24, + 15, + 27, ], - "type": "Keyword", - "value": "new", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 2, }, "start": Object { - "column": 8, + "column": 14, "line": 2, }, }, "range": Array [ - 25, - 26, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 26, - 32, + 31, + 34, ], "type": "Keyword", - "value": "public", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 6, + "line": 3, }, }, "range": Array [ - 33, - 34, + 35, + 36, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 34, - 35, + 37, + 38, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 19, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 36, - 43, + 39, + 40, ], - "type": "Keyword", - "value": "private", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 27, - "line": 2, + "column": 11, + "line": 3, }, }, "range": Array [ - 44, - 45, + 40, + 41, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 14, + "line": 4, }, "start": Object { - "column": 28, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 45, - 46, + 44, + 56, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 15, + "line": 4, }, "start": Object { - "column": 29, - "line": 2, + "column": 14, + "line": 4, }, }, "range": Array [ - 46, - 47, + 56, + 57, ], "type": "Punctuator", "value": ";", @@ -35173,16 +34575,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 48, - 49, + 58, + 59, ], "type": "Punctuator", "value": "}", @@ -35192,119 +34594,176 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/directive-in-namespace.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "TSInterfaceBody", - }, - "extends": Array [ - Object { - "expression": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 30, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "Bar", "range": Array [ - 25, - 28, + 18, + 31, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "type": "ExpressionStatement", }, - "range": Array [ - 25, - 28, - ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "params": Array [ + Object { + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "name": "a", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", }, - "range": Array [ - 29, - 30, - ], - "type": "TSTypeReference", - "typeName": Object { + "init": Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 10, + "line": 3, }, }, - "name": "J", "range": Array [ - 29, - 30, + 42, + 43, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "range": Array [ + 38, + 43, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 12, + "line": 3, }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 34, + 44, ], + "type": "VariableDeclaration", + }, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 47, + 59, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, "range": Array [ - 28, - 31, + 47, + 60, ], - "type": "TSTypeParameterInstantiation", + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, }, }, - ], + "range": Array [ + 14, + 62, + ], + "type": "TSModuleBlock", + }, "id": Object { "loc": Object { "end": Object { @@ -35316,7 +34775,7 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "foo", "range": Array [ 10, 13, @@ -35326,7 +34785,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -35335,70 +34794,16 @@ Object { }, "range": Array [ 0, - 36, + 62, ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, + "type": "TSModuleDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -35407,7 +34812,7 @@ Object { }, "range": Array [ 0, - 37, + 63, ], "sourceType": "module", "tokens": Array [ @@ -35426,8 +34831,8 @@ Object { 0, 9, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "namespace", }, Object { "loc": Object { @@ -35445,184 +34850,202 @@ Object { 13, ], "type": "Identifier", - "value": "Foo", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 15, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 14, - 15, + 18, + 30, ], - "type": "Identifier", - "value": "T", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 15, - 16, + 30, + 31, ], "type": "Punctuator", - "value": ">", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 17, - 24, + 34, + 37, ], "type": "Keyword", - "value": "extends", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 25, - 28, + 38, + 39, ], "type": "Identifier", - "value": "Bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 28, - 29, + 40, + 41, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 29, - 30, + 42, + 43, ], - "type": "Identifier", - "value": "J", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 30, - 31, + 43, + 44, ], "type": "Punctuator", - "value": ">", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 32, - 33, + 47, + 59, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 59, + 60, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 35, - 36, + 61, + 62, ], "type": "Punctuator", "value": "}", @@ -35632,50 +35055,32 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` +exports[`typescript fixtures/basics/export-as-namespace.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "TSInterfaceBody", - }, "id": Object { "loc": Object { "end": Object { - "column": 14, + "column": 21, "line": 1, }, "start": Object { - "column": 10, + "column": 20, "line": 1, }, }, - "name": "Test", + "name": "a", "range": Array [ - 10, - 14, + 20, + 21, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -35684,70 +35089,16 @@ Object { }, "range": Array [ 0, - 21, + 22, ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "range": Array [ - 15, - 16, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 14, - 17, - ], - "type": "TSTypeParameterDeclaration", - }, + "type": "TSNamespaceExportDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -35756,14 +35107,14 @@ Object { }, "range": Array [ 0, - 22, + 23, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -35773,225 +35124,357 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 9, ], "type": "Identifier", - "value": "Test", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 15, + 10, + 19, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "namespace", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 20, "line": 1, }, }, "range": Array [ - 15, - 16, + 20, + 21, ], "type": "Identifier", - "value": "T", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 16, + "column": 21, "line": 1, }, }, "range": Array [ - 16, - 17, + 21, + 22, ], "type": "Punctuator", - "value": ">", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-assignment.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 13, ], - "type": "Punctuator", - "value": "{", + "type": "TSExportAssignment", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 6, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` +exports[`typescript fixtures/basics/export-declare-const-named-enum.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "declaration": Object { + "const": true, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "members": Array [ Object { - "computed": false, - "key": Object { + "id": Object { "loc": Object { "end": Object { "column": 7, - "line": 6, + "line": 2, }, "start": Object { "column": 4, - "line": 6, + "line": 2, }, }, "name": "foo", "range": Array [ - 76, - 79, + 36, + 39, ], "type": "Identifier", }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 11, + "line": 2, }, "start": Object { "column": 4, - "line": 6, + "line": 2, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, + "range": Array [ + 36, + 43, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, }, - "name": "bar", - "range": Array [ - 80, - 83, - ], - "type": "Identifier", }, - ], + "name": "bar", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, "range": Array [ - 76, - 85, + 49, + 52, ], - "type": "TSMethodSignature", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 1, + "type": "TSEnumMember", }, - }, - "range": Array [ - 15, - 87, ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", "range": Array [ - 10, - 14, + 21, + 54, ], - "type": "Identifier", + "type": "TSEnumDeclaration", }, "loc": Object { "end": Object { "column": 1, - "line": 7, + "line": 4, }, "start": Object { "column": 0, @@ -36000,38 +35483,18 @@ Object { }, "range": Array [ 0, - 87, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 71, + 54, ], - "type": "Block", - "value": "* - * Comment Line 1 - * @baz bar - ", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], + "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 8, + "line": 5, }, "start": Object { "column": 0, @@ -36040,14 +35503,14 @@ Object { }, "range": Array [ 0, - 88, + 55, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -36057,10 +35520,10 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { @@ -36069,21 +35532,21 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, + 7, 14, ], "type": "Identifier", - "value": "Test", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { @@ -36093,7 +35556,61 @@ Object { }, "range": Array [ 15, - 16, + 20, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 25, + ], + "type": "Keyword", + "value": "enum", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, ], "type": "Punctuator", "value": "{", @@ -36102,16 +35619,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 6, + "line": 2, }, "start": Object { "column": 4, - "line": 6, + "line": 2, }, }, "range": Array [ - 76, - 79, + 36, + 39, ], "type": "Identifier", "value": "foo", @@ -36119,89 +35636,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 9, + "line": 2, }, "start": Object { - "column": 7, - "line": 6, + "column": 8, + "line": 2, }, }, "range": Array [ - 79, - 80, + 40, + 41, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 6, + "line": 2, }, "start": Object { - "column": 8, - "line": 6, + "column": 10, + "line": 2, }, }, "range": Array [ - 80, - 83, + 42, + 43, ], - "type": "Identifier", - "value": "bar", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 6, + "line": 2, }, "start": Object { "column": 11, - "line": 6, + "line": 2, }, }, "range": Array [ - 83, - 84, + 43, + 44, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 7, + "line": 3, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 3, }, }, "range": Array [ - 84, - 85, + 49, + 52, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 7, + "line": 4, }, "start": Object { "column": 0, - "line": 7, + "line": 4, }, }, "range": Array [ - 86, - 87, + 53, + 54, ], "type": "Punctuator", "value": "}", @@ -36211,15 +35728,43 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = ` +exports[`typescript fixtures/basics/export-declare-named-enum.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "declaration": Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "members": Array [ Object { - "computed": false, - "key": Object { + "id": Object { "loc": Object { "end": Object { "column": 7, @@ -36232,14 +35777,33 @@ Object { }, "name": "foo", "range": Array [ - 21, - 24, + 30, + 33, ], "type": "Identifier", }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 2, }, "start": Object { @@ -36247,16 +35811,14 @@ Object { "line": 2, }, }, - "optional": true, "range": Array [ - 21, - 26, + 30, + 37, ], - "type": "TSPropertySignature", + "type": "TSEnumMember", }, Object { - "computed": false, - "key": Object { + "id": Object { "loc": Object { "end": Object { "column": 7, @@ -36269,14 +35831,14 @@ Object { }, "name": "bar", "range": Array [ - 31, - 34, + 43, + 46, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 3, }, "start": Object { @@ -36284,215 +35846,23 @@ Object { "line": 3, }, }, - "optional": true, "range": Array [ - 31, - 44, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 35, - 43, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "baz", - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "optional": true, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "foo", - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 59, - 71, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 63, - 71, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "name": "baz", - "optional": true, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 49, - 79, + 43, + 46, ], - "type": "TSMethodSignature", + "type": "TSEnumMember", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, "range": Array [ 15, - 81, - ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "range": Array [ - 10, - 14, + 48, ], - "type": "Identifier", + "type": "TSEnumDeclaration", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -36501,16 +35871,18 @@ Object { }, "range": Array [ 0, - 81, + 48, ], - "type": "TSInterfaceDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -36519,14 +35891,14 @@ Object { }, "range": Array [ 0, - 82, + 49, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -36536,10 +35908,10 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { @@ -36548,21 +35920,21 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, + 7, 14, ], "type": "Identifier", - "value": "test", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { @@ -36572,38 +35944,38 @@ Object { }, "range": Array [ 15, - 16, + 19, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 21, - 24, + 20, + 23, ], "type": "Identifier", - "value": "foo", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ @@ -36611,382 +35983,390 @@ Object { 25, ], "type": "Punctuator", - "value": "?", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { - "column": 8, + "column": 4, "line": 2, }, }, "range": Array [ - 25, - 26, + 30, + 33, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 9, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 8, + "line": 2, }, }, "range": Array [ - 31, 34, + 35, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 2, }, "start": Object { - "column": 7, - "line": 3, + "column": 10, + "line": 2, }, }, "range": Array [ - 34, - 35, + 36, + 37, ], - "type": "Punctuator", - "value": "?", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 12, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 2, }, }, "range": Array [ - 35, - 36, + 37, + 38, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 7, "line": 3, }, "start": Object { - "column": 10, + "column": 4, "line": 3, }, }, "range": Array [ - 37, 43, + 46, ], "type": "Identifier", - "value": "string", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 16, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ - 43, - 44, + 47, + 48, ], "type": "Punctuator", - "value": ";", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-default-class-with-generic.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 28, + ], + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 23, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 7, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 49, - 52, + 0, + 28, ], - "type": "Identifier", - "value": "baz", + "type": "ExportDefaultDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { - "column": 7, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 52, - 53, + 0, + 6, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 7, + "line": 1, }, }, "range": Array [ - 53, - 54, + 7, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 54, - 57, + 15, + 20, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { "column": 20, - "line": 4, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, + "line": 1, }, }, "range": Array [ - 71, - 72, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 28, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 73, - 76, + 21, + 22, ], "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "?", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { - "column": 32, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 77, - 78, + 22, + 23, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 4, + "column": 25, + "line": 1, }, "start": Object { - "column": 33, - "line": 4, + "column": 24, + "line": 1, }, }, "range": Array [ - 78, - 79, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 80, - 81, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -36996,49 +36376,30 @@ Object { } `; -exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` +exports[`typescript fixtures/basics/export-default-class-with-multiple-generics.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 27, + "line": 1, }, - "range": Array [ - 21, - 25, - ], - "type": "TSPropertySignature", }, - ], + "range": Array [ + 27, + 31, + ], + "type": "ClassBody", + }, + "id": null, "loc": Object { "end": Object { "column": 1, @@ -37051,27 +36412,99 @@ Object { }, "range": Array [ 15, - 27, + 31, ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + "range": Array [ + 24, + 25, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 26, + ], + "type": "TSTypeParameterDeclaration", }, - "name": "test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", }, "loc": Object { "end": Object { @@ -37085,9 +36518,9 @@ Object { }, "range": Array [ 0, - 27, + 31, ], - "type": "TSInterfaceDeclaration", + "type": "ExportDefaultDeclaration", }, ], "comments": Array [], @@ -37103,14 +36536,14 @@ Object { }, "range": Array [ 0, - 28, + 32, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -37120,10 +36553,10 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { @@ -37132,21 +36565,21 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, + 7, 14, ], - "type": "Identifier", - "value": "test", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { @@ -37156,46 +36589,118 @@ Object { }, "range": Array [ 15, - 16, + 20, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ 21, - 24, + 22, ], "type": "Identifier", - "value": "foo", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, }, }, "range": Array [ 24, 25, ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], "type": "Punctuator", - "value": ";", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -37209,8 +36714,8 @@ Object { }, }, "range": Array [ - 26, - 27, + 30, + 31, ], "type": "Punctuator", "value": "}", @@ -37220,271 +36725,90 @@ Object { } `; -exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` +exports[`typescript fixtures/basics/export-named-class-with-generic.src 1`] = ` Object { "body": Array [ Object { - "id": Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 24, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, - "name": "x", "range": Array [ - 5, - 6, + 7, + 24, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "keyof", - "range": Array [ - 9, - 18, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, - "range": Array [ - 15, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/nested-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "nestedArray", - "range": Array [ - 4, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 44, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, - "range": Array [ - 15, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 44, + "column": 18, "line": 1, }, "start": Object { @@ -37492,199 +36816,31 @@ Object { "line": 1, }, }, + "name": "T", "range": Array [ 17, - 44, + 18, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 43, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 23, - 28, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 42, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 34, - 42, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 28, - 43, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 22, - 44, - ], - "type": "TSTypeParameterInstantiation", - }, + "type": "Identifier", }, + "range": Array [ + 17, + 18, + ], + "type": "TSTypeParameter", }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, + ], "range": Array [ - 4, - 44, + 16, + 19, ], - "type": "VariableDeclarator", + "type": "TSTypeParameterDeclaration", }, - ], - "kind": "var", + }, "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -37693,16 +36849,18 @@ Object { }, "range": Array [ 0, - 44, + 24, ], - "type": "VariableDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -37711,14 +36869,14 @@ Object { }, "range": Array [ 0, - 44, + 25, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 6, "line": 1, }, "start": Object { @@ -37728,28 +36886,28 @@ Object { }, "range": Array [ 0, - 3, + 6, ], "type": "Keyword", - "value": "var", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "range": Array [ - 4, - 15, + 7, + 12, ], - "type": "Identifier", - "value": "nestedArray", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { @@ -37758,480 +36916,283 @@ Object { "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, + 13, 16, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ + 16, 17, - 22, ], - "type": "Identifier", - "value": "Array", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 22, + "column": 17, "line": 1, }, }, "range": Array [ - 22, - 23, + 17, + 18, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 19, "line": 1, }, "start": Object { - "column": 23, + "column": 18, "line": 1, }, }, "range": Array [ - 23, - 28, + 18, + 19, ], - "type": "Identifier", - "value": "Array", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 28, + "column": 20, "line": 1, }, }, "range": Array [ - 28, - 29, + 20, + 21, ], "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 43, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 43, - 44, + 23, + 24, ], "type": "Punctuator", - "value": ">", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/never-type-param.src 1`] = ` +exports[`typescript fixtures/basics/export-named-class-with-multiple-generics.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 17, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "TSNeverKeyword", - }, - ], - "range": Array [ - 10, - 17, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, + "declaration": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 6, + "column": 23, "line": 1, }, }, "range": Array [ - 6, - 17, + 23, + 27, ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ClassBody", }, - }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", - }, - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, + "id": Object { "loc": Object { "end": Object { "column": 16, - "line": 2, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "Observable", - "range": Array [ - 19, - 29, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, + "column": 13, + "line": 1, }, - "name": "empty", - "range": Array [ - 30, - 35, - ], - "type": "Identifier", }, + "name": "Foo", "range": Array [ - 19, - 35, + 13, + 16, ], - "type": "MemberExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 0, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 19, - 44, + 7, + 27, ], - "type": "CallExpression", + "superClass": null, + "type": "ClassDeclaration", "typeParameters": Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { "column": 16, - "line": 2, + "line": 1, }, }, "params": Array [ Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { "column": 17, - "line": 2, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, }, + "name": "T", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", }, "range": Array [ - 36, - 41, + 17, + 18, ], - "type": "TSNeverKeyword", + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "range": Array [ + 20, + 21, + ], + "type": "TSTypeParameter", }, ], "range": Array [ - 35, - 42, + 16, + 22, ], - "type": "TSTypeParameterInstantiation", + "type": "TSTypeParameterDeclaration", }, }, "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 19, - 45, + 0, + 27, ], - "type": "ExpressionStatement", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -38240,14 +37201,14 @@ Object { }, "range": Array [ 0, - 46, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 6, "line": 1, }, "start": Object { @@ -38257,115 +37218,133 @@ Object { }, "range": Array [ 0, - 5, + 6, ], "type": "Keyword", - "value": "const", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 12, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, ], "type": "Identifier", - "value": "x", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, "range": Array [ - 7, - 8, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Identifier", - "value": "X", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, }, "start": Object { - "column": 11, + "column": 20, "line": 1, }, }, "range": Array [ - 11, - 16, + 20, + 21, ], "type": "Identifier", - "value": "never", + "value": "U", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 16, + "column": 21, "line": 1, }, }, "range": Array [ - 16, - 17, + 21, + 22, ], "type": "Punctuator", "value": ">", @@ -38373,525 +37352,511 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 24, "line": 1, }, "start": Object { - "column": 17, + "column": 23, "line": 1, }, }, "range": Array [ - 17, - 18, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 3, }, }, "range": Array [ - 19, - 29, + 26, + 27, ], - "type": "Identifier", - "value": "Observable", + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-named-enum.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "members": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 29, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 35, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "TSEnumMember", + }, + ], + "range": Array [ + 7, + 40, + ], + "type": "TSEnumDeclaration", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 29, - 30, + 7, + 11, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 30, - 35, + 12, + 15, ], "type": "Identifier", - "value": "empty", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 2, + "line": 1, }, "start": Object { "column": 16, - "line": 2, + "line": 1, }, }, "range": Array [ - 35, - 36, + 16, + 17, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 7, "line": 2, }, "start": Object { - "column": 17, + "column": 4, "line": 2, }, }, "range": Array [ - 36, - 41, + 22, + 25, ], "type": "Identifier", - "value": "never", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 9, "line": 2, }, "start": Object { - "column": 22, + "column": 8, "line": 2, }, }, "range": Array [ - 41, - 42, + 26, + 27, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 11, "line": 2, }, "start": Object { - "column": 23, + "column": 10, "line": 2, }, }, "range": Array [ - 42, - 43, + 28, + 29, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 2, }, "start": Object { - "column": 24, + "column": 11, "line": 2, }, }, "range": Array [ - 43, - 44, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 25, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 44, - 45, + 35, + 38, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 39, + 40, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/non-null-assertion-operator.src 1`] = ` +exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "e", - "range": Array [ - 56, - 57, - ], - "type": "Identifier", + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestAlias", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 40, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 39, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 24, + "line": 1, }, - "name": "validateEntity", - "range": Array [ - 41, - 55, - ], - "type": "Identifier", }, + "range": Array [ + 24, + 30, + ], + "type": "TSStringKeyword", + }, + Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 39, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 41, - 58, + 33, + 39, ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "type": "TSNumberKeyword", }, - "range": Array [ - 41, - 59, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "s", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "init": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "e", - "range": Array [ - 72, - 73, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "TSNonNullExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "name", - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - }, - "range": Array [ - 72, - 79, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 79, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 64, - 80, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 82, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], }, - "name": "processEntity", - "range": Array [ - 9, - 22, - ], - "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "e", - "optional": true, - "range": Array [ - 23, - 33, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "Entity", - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - }, - }, - }, - }, - ], "range": Array [ 0, - 82, + 40, ], - "type": "FunctionDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { "column": 0, @@ -38900,14 +37865,14 @@ Object { }, "range": Array [ 0, - 82, + 40, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -38917,69 +37882,69 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 22, + 7, + 11, ], "type": "Identifier", - "value": "processEntity", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 1, }, "start": Object { - "column": 22, + "column": 12, "line": 1, }, }, "range": Array [ - 22, - 23, + 12, + 21, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "TestAlias", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, "line": 1, }, }, "range": Array [ + 22, 23, - 24, ], - "type": "Identifier", - "value": "e", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { @@ -38989,529 +37954,587 @@ Object { }, "range": Array [ 24, - 25, + 30, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 32, "line": 1, }, "start": Object { - "column": 25, + "column": 31, "line": 1, }, }, "range": Array [ - 25, - 26, + 31, + 32, ], "type": "Punctuator", - "value": ":", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 39, "line": 1, }, "start": Object { - "column": 27, + "column": 33, "line": 1, }, }, "range": Array [ - 27, 33, + 39, ], "type": "Identifier", - "value": "Entity", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 40, "line": 1, }, "start": Object { - "column": 33, + "column": 39, "line": 1, }, }, "range": Array [ - 33, - 34, + 39, + 40, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-type-class-declaration.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestClassProps", + "range": Array [ + 12, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 51, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "count", + "range": Array [ + 35, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 29, + 50, + ], + "type": "TSTypeLiteral", + }, + }, "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 35, + "column": 0, "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 51, ], - "type": "Punctuator", - "value": "{", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 41, - 55, + 0, + 6, ], - "type": "Identifier", - "value": "validateEntity", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 55, - 56, + 7, + 11, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 56, - 57, + 12, + 26, ], "type": "Identifier", - "value": "e", + "value": "TestClassProps", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 57, - 58, + 27, + 28, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 58, - 59, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 9, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 64, - 67, + 35, + 40, ], - "type": "Keyword", - "value": "let", + "type": "Identifier", + "value": "count", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "s", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 70, - 71, + 40, + 41, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 11, + "line": 2, }, }, "range": Array [ - 72, - 73, + 42, + 48, ], "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "!", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 1, "line": 3, }, "start": Object { - "column": 14, + "column": 0, "line": 3, }, }, "range": Array [ - 74, - 75, + 49, + 50, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - "value": "name", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 2, "line": 3, }, "start": Object { - "column": 19, + "column": 1, "line": 3, }, }, "range": Array [ - 79, - 80, + 50, + 51, ], "type": "Punctuator", "value": ";", }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/null-and-undefined-type-annotations.src 1`] = ` +exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "name": "x", - "range": Array [ - 4, - 11, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestCallback", + "range": Array [ + 12, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 11, + "column": 37, "line": 1, }, "start": Object { - "column": 5, + "column": 28, "line": 1, }, }, + "name": "a", "range": Array [ - 5, - 11, + 28, + 37, ], - "type": "TSTypeAnnotation", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, + "column": 37, "line": 1, }, "start": Object { - "column": 7, + "column": 29, "line": 1, }, }, "range": Array [ - 7, - 11, + 29, + 37, ], - "type": "TSNullKeyword", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSNumberKeyword", + }, }, }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, + ], "range": Array [ - 4, - 11, + 27, + 46, ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 39, + "line": 1, }, }, - "name": "y", "range": Array [ - 17, - 29, + 39, + 46, ], - "type": "Identifier", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 18, - 29, + 42, + 46, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 29, - ], - "type": "TSUndefinedKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "TSVoidKeyword", }, }, - "range": Array [ - 17, - 29, - ], - "type": "VariableDeclarator", + "type": "TSFunctionType", }, - ], - "kind": "let", + }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 47, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 13, - 30, + 0, + 47, ], - "type": "VariableDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 47, + "line": 1, }, "start": Object { "column": 0, @@ -39520,14 +38543,14 @@ Object { }, "range": Array [ 0, - 30, + 47, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 6, "line": 1, }, "start": Object { @@ -39537,169 +38560,205 @@ Object { }, "range": Array [ 0, - 3, + 6, ], "type": "Keyword", - "value": "let", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "range": Array [ - 4, - 5, + 7, + 11, ], "type": "Identifier", - "value": "x", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 24, "line": 1, }, "start": Object { - "column": 5, + "column": 12, "line": 1, }, }, "range": Array [ - 5, - 6, + 12, + 24, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "TestCallback", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 26, "line": 1, }, "start": Object { - "column": 7, + "column": 25, "line": 1, }, }, "range": Array [ - 7, - 11, + 25, + 26, ], - "type": "Keyword", - "value": "null", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 28, "line": 1, }, "start": Object { - "column": 11, + "column": 27, "line": 1, }, }, "range": Array [ - 11, - 12, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 13, - 16, + 28, + 29, ], - "type": "Keyword", - "value": "let", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 17, - 18, + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, ], "type": "Identifier", - "value": "y", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 38, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 37, + "line": 1, }, }, "range": Array [ - 18, - 19, + 37, + 38, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 39, + "line": 1, }, }, "range": Array [ - 20, - 29, + 39, + 41, ], - "type": "Identifier", - "value": "undefined", + "type": "Punctuator", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 29, - 30, + 42, + 46, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, ], "type": "Punctuator", "value": ";", @@ -39709,91 +38768,139 @@ Object { } `; -exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +exports[`typescript fixtures/basics/function-overloads.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 15, + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, - "properties": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 13, + "column": 27, "line": 1, }, "start": Object { - "column": 3, + "column": 18, "line": 1, }, }, - "method": false, + "name": "x", "range": Array [ - 3, - 13, + 18, + 27, ], - "shorthand": false, - "type": "Property", - "value": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 13, + "column": 27, "line": 1, }, "start": Object { - "column": 9, + "column": 19, "line": 1, }, }, "range": Array [ - 9, - 13, + 19, + 27, ], - "raw": "null", - "type": "Literal", - "value": null, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "TSNumberKeyword", + }, }, }, ], "range": Array [ - 1, - 15, + 7, + 37, ], - "type": "ObjectExpression", + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "TSDeclareFunction", }, "loc": Object { "end": Object { - "column": 17, + "column": 37, "line": 1, }, "start": Object { @@ -39803,339 +38910,434 @@ Object { }, "range": Array [ 0, - 17, + 37, ], - "type": "ExpressionStatement", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, Object { - "expression": Object { + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "f", + "range": Array [ + 54, + 55, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 37, + "line": 2, }, "start": Object { - "column": 1, - "line": 3, + "column": 7, + "line": 2, }, }, - "properties": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 22, - 26, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 3, - "line": 3, + "column": 18, + "line": 2, }, }, - "method": true, + "name": "x", "range": Array [ - 22, - 31, + 56, + 65, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 57, + 65, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 21, + "line": 2, }, }, "range": Array [ - 29, - 31, + 59, + 65, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, + "type": "TSStringKeyword", }, - "params": Array [], - "range": Array [ - 26, - 31, - ], - "type": "FunctionExpression", }, }, ], "range": Array [ - 20, - 33, + 45, + 75, ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 19, - 35, - ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 41, - 45, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, }, - "kind": "init", + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 66, + 74, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 36, + "line": 2, }, "start": Object { - "column": 3, - "line": 5, + "column": 30, + "line": 2, }, }, - "method": false, "range": Array [ - 40, - 52, + 68, + 74, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 48, - 52, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, + "type": "TSStringKeyword", }, - ], - "range": Array [ - 38, - 54, - ], - "type": "ObjectExpression", + }, + "type": "TSDeclareFunction", }, "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 37, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 2, }, }, "range": Array [ - 37, - 56, + 38, + 75, ], - "type": "ExpressionStatement", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "declaration": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "x", + "range": Array [ + 142, + 143, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 11, + "line": 4, }, "start": Object { - "column": 10, - "line": 7, + "column": 2, + "line": 4, }, }, "range": Array [ - 68, - 72, + 135, + 144, ], - "raw": "'__'", - "type": "Literal", - "value": "__", + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 55, + "line": 3, + }, + }, + "range": Array [ + 131, + 146, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, }, + }, + "name": "f", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 36, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 18, + "line": 3, }, }, + "name": "x", "range": Array [ - 68, - 79, + 94, + 112, ], - "static": false, - "type": "ClassProperty", - "value": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 36, + "line": 3, }, "start": Object { - "column": 17, - "line": 7, + "column": 19, + "line": 3, }, }, "range": Array [ - 75, - 79, + 95, + 112, ], - "raw": "null", - "type": "Literal", - "value": null, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 97, + 112, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 97, + 103, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 106, + 112, + ], + "type": "TSNumberKeyword", + }, + ], + }, + }, }, - }, + ], "range": Array [ - 66, - 81, + 83, + 146, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, + "returnType": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 37, + "line": 3, + }, }, - "start": Object { - "column": 6, - "line": 7, + "range": Array [ + 113, + 130, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 115, + 130, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 115, + 121, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 48, + "line": 3, + }, + }, + "range": Array [ + 124, + 130, + ], + "type": "TSNumberKeyword", + }, + ], }, }, - "name": "X", - "range": Array [ - 64, - 65, - ], - "type": "Identifier", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 23, - "line": 7, + "column": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 7, + "line": 3, }, }, "range": Array [ - 58, - 81, + 76, + 146, ], - "superClass": null, - "type": "ClassDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 8, + "line": 6, }, "start": Object { "column": 0, @@ -40144,14 +39346,14 @@ Object { }, "range": Array [ 0, - 82, + 147, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -40161,619 +39363,727 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 15, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 2, + 7, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 17, "line": 1, }, "start": Object { - "column": 3, + "column": 16, "line": 1, }, }, "range": Array [ - 3, - 7, + 16, + 17, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, "range": Array [ - 7, - 8, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 18, "line": 1, }, }, "range": Array [ - 9, - 13, + 18, + 19, ], - "type": "Keyword", - "value": "null", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 19, "line": 1, }, }, "range": Array [ - 14, - 15, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 27, "line": 1, }, "start": Object { - "column": 15, + "column": 21, "line": 1, }, }, "range": Array [ - 15, - 16, + 21, + 27, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 28, "line": 1, }, "start": Object { - "column": 16, + "column": 27, "line": 1, }, }, "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 20, - 21, + 28, + 29, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 3, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 22, - 26, + 30, + 36, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 37, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 36, + "line": 1, }, }, "range": Array [ - 26, - 27, + 36, + 37, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 6, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 27, - 28, + 38, + 44, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 29, - 30, + 45, + 53, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 11, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 30, - 31, + 54, + 55, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 13, - "line": 3, + "column": 17, + "line": 2, }, }, "range": Array [ - 32, - 33, + 55, + 56, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 19, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 18, + "line": 2, }, }, "range": Array [ - 33, - 34, + 56, + 57, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 15, - "line": 3, + "column": 19, + "line": 2, }, }, "range": Array [ - 34, - 35, + 57, + 58, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 27, + "line": 2, }, "start": Object { - "column": 0, - "line": 5, + "column": 21, + "line": 2, }, }, "range": Array [ - 37, - 38, + 59, + 65, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 28, + "line": 2, }, "start": Object { - "column": 1, - "line": 5, + "column": 27, + "line": 2, }, }, "range": Array [ - 38, - 39, + 65, + 66, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 29, + "line": 2, }, "start": Object { - "column": 3, - "line": 5, + "column": 28, + "line": 2, }, }, "range": Array [ - 40, - 41, + 66, + 67, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 36, + "line": 2, }, "start": Object { - "column": 4, - "line": 5, + "column": 30, + "line": 2, }, }, "range": Array [ - 41, - 45, + 68, + 74, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 37, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 36, + "line": 2, }, }, "range": Array [ - 45, - 46, + 74, + 75, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 6, + "line": 3, }, "start": Object { - "column": 9, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 46, - 47, + 76, + 82, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 5, + "line": 3, }, "start": Object { - "column": 11, - "line": 5, + "column": 7, + "line": 3, }, }, "range": Array [ - 48, - 52, + 83, + 91, ], "type": "Keyword", - "value": "null", + "value": "function", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 5, + "line": 3, }, "start": Object { "column": 16, - "line": 5, + "line": 3, }, }, "range": Array [ - 53, - 54, + 92, + 93, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 5, + "line": 3, }, "start": Object { "column": 17, - "line": 5, + "line": 3, }, }, "range": Array [ - 54, - 55, + 93, + 94, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 5, + "line": 3, }, "start": Object { "column": 18, - "line": 5, + "line": 3, }, }, "range": Array [ - 55, - 56, + 94, + 95, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 95, + 96, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 27, + "line": 3, }, "start": Object { - "column": 0, - "line": 7, + "column": 21, + "line": 3, }, }, "range": Array [ - 58, - 63, + 97, + 103, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 29, + "line": 3, }, "start": Object { - "column": 6, - "line": 7, + "column": 28, + "line": 3, }, }, "range": Array [ - 64, - 65, + 104, + 105, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 106, + 112, ], "type": "Identifier", - "value": "X", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 37, + "line": 3, }, "start": Object { - "column": 8, - "line": 7, + "column": 36, + "line": 3, }, }, "range": Array [ - 66, - 67, + 112, + 113, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 38, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 37, + "line": 3, }, }, "range": Array [ - 68, - 72, + 113, + 114, ], - "type": "String", - "value": "'__'", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 7, + "column": 45, + "line": 3, }, "start": Object { - "column": 15, - "line": 7, + "column": 39, + "line": 3, }, }, "range": Array [ - 73, - 74, + 115, + 121, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 122, + 123, ], "type": "Punctuator", - "value": "=", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 54, + "line": 3, }, "start": Object { - "column": 17, - "line": 7, + "column": 48, + "line": 3, }, }, "range": Array [ - 75, - 79, + 124, + 130, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 3, + }, + "start": Object { + "column": 55, + "line": 3, + }, + }, + "range": Array [ + 131, + 132, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 135, + 141, ], "type": "Keyword", - "value": "null", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 7, + "column": 10, + "line": 4, }, "start": Object { - "column": 22, - "line": 7, + "column": 9, + "line": 4, }, }, "range": Array [ - 80, - 81, + 142, + 143, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 143, + 144, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 145, + 146, ], "type": "Punctuator", "value": "}", @@ -40783,26 +40093,79 @@ Object { } `; -exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` +exports[`typescript fixtures/basics/function-with-await.src 1`] = ` Object { "body": Array [ Object { - "async": false, + "async": true, "body": Object { - "body": Array [], + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "future", + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 46, + ], + "type": "AwaitExpression", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 47, + ], + "type": "ExpressionStatement", + }, + ], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 40, + "column": 28, "line": 1, }, }, "range": Array [ - 40, - 42, + 28, + 49, ], "type": "BlockStatement", }, @@ -40811,25 +40174,25 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, - "name": "test", + "name": "hope", "range": Array [ - 9, - 13, + 15, + 19, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -40840,130 +40203,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, + "column": 26, "line": 1, }, "start": Object { - "column": 14, + "column": 20, "line": 1, }, }, - "name": "abc", + "name": "future", "range": Array [ - 14, - 38, + 20, + 26, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "Map", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSSymbolKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 22, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, }, ], "range": Array [ 0, - 42, + 49, ], "type": "FunctionDeclaration", }, @@ -40971,8 +40229,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -40981,14 +40239,14 @@ Object { }, "range": Array [ 0, - 42, + 50, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -40998,28 +40256,10 @@ Object { }, "range": Array [ 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, + 5, ], "type": "Identifier", - "value": "test", + "value": "async", }, Object { "loc": Object { @@ -41028,88 +40268,88 @@ Object { "line": 1, }, "start": Object { - "column": 13, + "column": 6, "line": 1, }, }, "range": Array [ - 13, + 6, 14, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 17, + 15, + 19, ], "type": "Identifier", - "value": "abc", + "value": "hope", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, "range": Array [ - 17, - 18, + 19, + 20, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 26, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, - 22, + 20, + 26, ], "type": "Identifier", - "value": "Map", + "value": "future", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 22, + "column": 26, "line": 1, }, }, "range": Array [ - 22, - 23, + 26, + 27, ], "type": "Punctuator", - "value": "<", + "value": ")", }, Object { "loc": Object { @@ -41118,121 +40358,85 @@ Object { "line": 1, }, "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, + "column": 28, "line": 1, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 31, - 37, + 34, + 39, ], "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 38, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 38, - 39, + 40, + 46, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "future", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 40, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 40, - 41, + 46, + 47, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 41, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 41, - 42, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -41242,247 +40446,350 @@ Object { } `; -exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` +exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.src 1`] = ` Object { "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 51, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, - "name": "Result", + "name": "foo", "range": Array [ - 5, - 11, + 9, + 12, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "range": Array [ - 0, - 37, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, - }, - "range": Array [ - 17, - 37, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", }, - "start": Object { - "column": 17, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 14, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", }, }, - "range": Array [ - 17, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 24, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, - "name": "Success", + "method": false, "range": Array [ - 17, - 24, + 19, + 22, ], - "type": "Identifier", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, }, - "typeParameters": Object { + ], + "range": Array [ + 13, + 45, + ], + "type": "ObjectPattern", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 27, + "column": 45, "line": 1, }, "start": Object { - "column": 24, + "column": 25, "line": 1, }, }, - "params": Array [ + "members": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 26, + "column": 39, "line": 1, }, "start": Object { - "column": 25, + "column": 26, "line": 1, }, }, + "optional": true, "range": Array [ - 25, 26, + 39, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSPropertySignature", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 26, + "column": 38, "line": 1, }, "start": Object { - "column": 25, + "column": 30, "line": 1, }, }, - "name": "T", "range": Array [ - 25, - 26, + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 40, + 43, ], "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "optional": true, + "range": Array [ + 40, + 44, + ], + "type": "TSPropertySignature", }, ], "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 30, - 37, + 25, + 45, ], - "type": "Identifier", + "type": "TSTypeLiteral", }, }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "TSTypeParameterDeclaration", - }, + ], + "range": Array [ + 0, + 51, + ], + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -41491,14 +40798,14 @@ Object { }, "range": Array [ 0, - 37, + 52, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { @@ -41508,28 +40815,10 @@ Object { }, "range": Array [ 0, - 4, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, + 8, ], - "type": "Identifier", - "value": "Result", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -41538,16 +40827,16 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ - 11, + 9, 12, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -41564,8 +40853,8 @@ Object { 12, 13, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -41583,30 +40872,30 @@ Object { 14, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 16, + 14, + 17, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { @@ -41616,499 +40905,223 @@ Object { }, "range": Array [ 17, - 24, + 18, ], - "type": "Identifier", - "value": "Success", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 19, "line": 1, }, }, "range": Array [ - 24, - 25, + 19, + 22, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 23, "line": 1, }, "start": Object { - "column": 25, + "column": 22, "line": 1, }, }, "range": Array [ - 25, - 26, + 22, + 23, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 24, "line": 1, }, "start": Object { - "column": 26, + "column": 23, "line": 1, }, }, "range": Array [ - 26, - 27, + 23, + 24, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 26, "line": 1, }, "start": Object { - "column": 28, + "column": 25, "line": 1, }, }, "range": Array [ - 28, - 29, + 25, + 26, ], "type": "Punctuator", - "value": "|", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 29, "line": 1, }, "start": Object { - "column": 30, + "column": 26, "line": 1, }, }, "range": Array [ - 30, - 37, + 26, + 29, ], "type": "Identifier", - "value": "Failure", + "value": "bar", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = ` -Object { - "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 48, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 48, + 29, + 30, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 48, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "Success", - "range": Array [ - 28, - 35, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 35, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - }, - }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 22, - 24, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 25, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "?", }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 31, "line": 1, }, "start": Object { - "column": 0, + "column": 30, "line": 1, }, }, "range": Array [ - 0, - 4, + 30, + 31, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 38, "line": 1, }, "start": Object { - "column": 5, + "column": 32, "line": 1, }, }, "range": Array [ - 5, - 11, + 32, + 38, ], "type": "Identifier", - "value": "Result", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 39, "line": 1, }, "start": Object { - "column": 11, + "column": 38, "line": 1, }, }, "range": Array [ - 11, - 12, + 38, + 39, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 43, "line": 1, }, "start": Object { - "column": 12, + "column": 40, "line": 1, }, }, "range": Array [ - 12, - 13, + 40, + 43, ], "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 44, "line": 1, }, "start": Object { - "column": 22, + "column": 43, "line": 1, }, }, "range": Array [ - 22, - 23, + 43, + 44, ], "type": "Punctuator", - "value": "{", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 45, "line": 1, }, "start": Object { - "column": 23, + "column": 44, "line": 1, }, }, "range": Array [ - 23, - 24, + 44, + 45, ], "type": "Punctuator", "value": "}", @@ -42116,277 +41129,268 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 46, "line": 1, }, "start": Object { - "column": 24, + "column": 45, "line": 1, }, }, "range": Array [ - 24, - 25, + 45, + 46, ], "type": "Punctuator", - "value": ">", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 48, "line": 1, }, "start": Object { - "column": 26, + "column": 47, "line": 1, }, }, "range": Array [ - 26, - 27, + 47, + 48, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 28, - 35, + 50, + 51, ], - "type": "Identifier", - "value": "Success", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 45, + "line": 1, + }, }, + "range": Array [ + 45, + 49, + ], + "type": "BlockStatement", }, - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - "value": "Failure", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] = ` -Object { - "body": Array [ - Object { + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "name": "foo", "range": Array [ - 5, - 8, + 9, + 12, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "range": Array [ - 0, - 30, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, - }, - "members": Array [ - Object { - "computed": false, - "key": Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, - "name": "bar", + "method": false, "range": Array [ - 12, - 15, + 14, + 17, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", }, }, - "range": Array [ - 12, - 24, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 23, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, + "method": false, "range": Array [ - 15, - 23, + 19, + 22, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 23, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, + "name": "baz", "range": Array [ - 17, - 23, + 19, + 22, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, - }, - Object { - "computed": false, - "key": Object { + ], + "range": Array [ + 13, + 43, + ], + "type": "ObjectPattern", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 43, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, + "column": 43, "line": 1, }, "start": Object { @@ -42394,43 +41398,135 @@ Object { "line": 1, }, }, - "name": "baz", + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 38, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "TSPropertySignature", + }, + ], "range": Array [ 25, - 28, + 43, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "type": "TSTypeLiteral", }, - "range": Array [ - 25, - 28, - ], - "type": "TSPropertySignature", }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", - }, + }, + ], + "range": Array [ + 0, + 49, + ], + "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -42439,14 +41535,14 @@ Object { }, "range": Array [ 0, - 31, + 50, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { @@ -42456,25 +41552,25 @@ Object { }, "range": Array [ 0, - 4, + 8, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 8, + 9, + 12, ], "type": "Identifier", "value": "foo", @@ -42482,35 +41578,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, "range": Array [ - 9, - 10, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 12, + 13, + 14, ], "type": "Punctuator", "value": "{", @@ -42518,17 +41614,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 15, + 14, + 17, ], "type": "Identifier", "value": "bar", @@ -42536,47 +41632,65 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 16, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, "range": Array [ - 17, - 23, + 19, + 22, ], "type": "Identifier", - "value": "string", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, "line": 1, }, }, @@ -42585,12 +41699,12 @@ Object { 24, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { @@ -42600,10 +41714,10 @@ Object { }, "range": Array [ 25, - 28, + 26, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -42612,16 +41726,16 @@ Object { "line": 1, }, "start": Object { - "column": 28, + "column": 26, "line": 1, }, }, "range": Array [ - 28, + 26, 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { @@ -42639,14 +41753,140 @@ Object { 30, ], "type": "Punctuator", - "value": ";", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/type-guard.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` Object { "body": Array [ Object { @@ -42655,46 +41895,9 @@ Object { "body": Array [ Object { "argument": Object { - "left": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 52, - 60, - ], - "type": "UnaryExpression", - }, "loc": Object { "end": Object { - "column": 32, + "column": 12, "line": 2, }, "start": Object { @@ -42702,35 +41905,16 @@ Object { "line": 2, }, }, - "operator": "===", + "name": "b", "range": Array [ - 52, - 73, + 36, + 37, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "raw": "'string'", - "type": "Literal", - "value": "string", - }, - "type": "BinaryExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 32, + "column": 13, "line": 2, }, "start": Object { @@ -42739,8 +41923,8 @@ Object { }, }, "range": Array [ - 45, - 73, + 29, + 38, ], "type": "ReturnStatement", }, @@ -42751,13 +41935,13 @@ Object { "line": 3, }, "start": Object { - "column": 39, + "column": 23, "line": 1, }, }, "range": Array [ - 39, - 75, + 23, + 40, ], "type": "BlockStatement", }, @@ -42766,7 +41950,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { @@ -42774,10 +41958,10 @@ Object { "line": 1, }, }, - "name": "isString", + "name": "a", "range": Array [ 9, - 17, + 10, ], "type": "Identifier", }, @@ -42795,154 +41979,192 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 18, + "column": 14, "line": 1, }, }, - "name": "x", + "name": "b", "range": Array [ + 14, 18, - 24, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 19, + "column": 15, "line": 1, }, }, "range": Array [ - 19, - 24, + 15, + 18, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 24, + 17, + 18, ], - "type": "TSAnyKeyword", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, }, }, }, ], "range": Array [ 0, - 75, + 40, ], "returnType": Object { "loc": Object { "end": Object { - "column": 38, + "column": 22, "line": 1, }, "start": Object { - "column": 25, + "column": 19, "line": 1, }, }, "range": Array [ - 25, - 38, + 19, + 22, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, + "column": 22, "line": 1, }, "start": Object { - "column": 27, + "column": 21, "line": 1, }, }, - "parameterName": Object { + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 28, + "column": 22, "line": 1, }, "start": Object { - "column": 27, + "column": 21, "line": 1, }, }, - "name": "x", + "name": "X", "range": Array [ - 27, - 28, + 21, + 22, ], "type": "Identifier", }, - "range": Array [ - 27, - 38, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { + }, + }, + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 38, + "column": 12, "line": 1, }, "start": Object { - "column": 32, + "column": 11, "line": 1, }, }, - "range": Array [ - 32, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 38, + "column": 12, "line": 1, }, "start": Object { - "column": 32, + "column": 11, "line": 1, }, }, + "name": "X", "range": Array [ - 32, - 38, + 11, + 12, ], - "type": "TSStringKeyword", + "type": "Identifier", }, + "range": Array [ + 11, + 12, + ], + "type": "TSTypeParameter", }, - }, + ], + "range": Array [ + 10, + 13, + ], + "type": "TSTypeParameterDeclaration", }, - "type": "FunctionDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -42951,7 +42173,7 @@ Object { }, "range": Array [ 0, - 75, + 41, ], "sourceType": "module", "tokens": Array [ @@ -42976,7 +42198,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { @@ -42986,115 +42208,115 @@ Object { }, "range": Array [ 9, - 17, + 10, ], "type": "Identifier", - "value": "isString", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 10, "line": 1, }, }, "range": Array [ - 17, - 18, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Identifier", - "value": "x", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 13, "line": 1, }, "start": Object { - "column": 19, + "column": 12, "line": 1, }, }, "range": Array [ - 19, - 20, + 12, + 13, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 14, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, "range": Array [ - 21, - 24, + 13, + 14, ], - "type": "Identifier", - "value": "any", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 15, "line": 1, }, "start": Object { - "column": 24, + "column": 14, "line": 1, }, }, "range": Array [ - 24, - 25, + 14, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 16, ], "type": "Punctuator", "value": ":", @@ -43102,71 +42324,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, "range": Array [ - 27, - 28, + 17, + 18, ], "type": "Identifier", - "value": "x", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 19, "line": 1, }, "start": Object { - "column": 29, + "column": 18, "line": 1, }, }, "range": Array [ - 29, - 31, + 18, + 19, ], - "type": "Identifier", - "value": "is", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 20, "line": 1, }, "start": Object { - "column": 32, + "column": 19, "line": 1, }, }, "range": Array [ - 32, - 38, + 19, + 20, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, ], "type": "Identifier", - "value": "string", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 24, "line": 1, }, "start": Object { - "column": 39, + "column": 23, "line": 1, }, }, "range": Array [ - 39, - 40, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -43183,8 +42423,8 @@ Object { }, }, "range": Array [ - 45, - 51, + 29, + 35, ], "type": "Keyword", "value": "return", @@ -43192,7 +42432,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 2, }, "start": Object { @@ -43201,65 +42441,29 @@ Object { }, }, "range": Array [ - 52, - 58, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, + 36, + 37, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 2, }, "start": Object { - "column": 20, + "column": 12, "line": 2, }, }, "range": Array [ - 61, - 64, + 37, + 38, ], "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "type": "String", - "value": "'string'", + "value": ";", }, Object { "loc": Object { @@ -43273,8 +42477,8 @@ Object { }, }, "range": Array [ - 74, - 75, + 39, + 40, ], "type": "Punctuator", "value": "}", @@ -43284,133 +42488,26 @@ Object { } `; -exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters-that-have-comments.src 1`] = ` Object { "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 3, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "ExpressionStatement", - }, Object { "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 40, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 84, - 87, + 33, + 35, ], "type": "BlockStatement", }, @@ -43419,577 +42516,745 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { "column": 9, - "line": 2, + "line": 1, }, }, - "name": "bar", + "name": "compare", "range": Array [ - 53, - 56, + 9, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "params": Array [], "range": Array [ - 44, - 87, + 0, + 35, ], "type": "FunctionDeclaration", "typeParameters": Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 16, + "line": 1, }, }, "params": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 28, + "line": 1, }, }, "name": Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 28, + "line": 1, }, }, - "name": "A", + "name": "T", "range": Array [ - 68, - 69, + 28, + 29, ], "type": "Identifier", }, "range": Array [ - 68, - 69, + 28, + 29, ], "type": "TSTypeParameter", }, ], "range": Array [ - 56, - 81, + 16, + 30, ], "type": "TSTypeParameterDeclaration", }, }, + ], + "comments": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 134, - 137, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "baz", - "range": Array [ - 97, - 100, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 17, + "line": 1, }, }, - "params": Array [], "range": Array [ - 88, - 137, + 17, + 28, ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "params": Array [ - Object { - "default": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 126, - 129, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 126, - 129, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "A", - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - }, - "range": Array [ - 112, - 129, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 100, - 131, - ], - "type": "TSTypeParameterDeclaration", - }, + "type": "Block", + "value": "comment", }, ], - "comments": Array [ + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 35, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 0, "line": 1, }, }, "range": Array [ - 5, - 20, + 0, + 8, ], - "type": "Block", - "value": " comment 1 ", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 16, "line": 1, }, "start": Object { - "column": 23, + "column": 9, "line": 1, }, }, "range": Array [ - 23, - 38, + 9, + 16, ], - "type": "Block", - "value": " comment 2 ", + "type": "Identifier", + "value": "compare", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 58, - 67, + 16, + 17, ], - "type": "Block", - "value": " aaa ", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 70, - 79, + 28, + 29, ], - "type": "Block", - "value": " bbb ", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ - 102, - 111, + 29, + 30, ], - "type": "Block", - "value": " aaa ", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 114, - 123, + 30, + 31, ], - "type": "Block", - "value": " bbb ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 138, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 32, "line": 1, }, "start": Object { - "column": 0, + "column": 31, "line": 1, }, }, "range": Array [ - 0, - 3, + 31, + 32, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 34, "line": 1, }, "start": Object { - "column": 3, + "column": 33, "line": 1, }, }, "range": Array [ - 3, - 4, + 33, + 34, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 35, "line": 1, }, "start": Object { - "column": 21, + "column": 34, "line": 1, }, }, "range": Array [ - 21, - 22, + 34, + 35, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 40, + 49, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 51, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 39, + "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 25, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + }, + }, + }, + ], "range": Array [ - 39, - 40, + 0, + 51, ], - "type": "Punctuator", - "value": ">", + "returnType": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + }, + }, + }, + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 21, + 23, + ], + "type": "TSTypeLiteral", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 23, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 24, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 41, + "column": 8, "line": 1, }, "start": Object { - "column": 40, + "column": 0, "line": 1, }, }, "range": Array [ - 40, - 41, + 0, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 10, "line": 1, }, "start": Object { - "column": 41, + "column": 9, "line": 1, }, }, "range": Array [ - 41, - 42, + 9, + 10, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 11, "line": 1, }, "start": Object { - "column": 42, + "column": 10, "line": 1, }, }, "range": Array [ - 42, - 43, + 10, + 11, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 44, - 52, + 11, + 12, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 53, - 56, + 13, + 20, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 56, - 57, + 21, + 22, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 68, - 69, + 22, + 23, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 80, - 81, + 23, + 24, ], "type": "Punctuator", "value": ">", @@ -43997,17 +43262,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 37, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 81, - 82, + 24, + 25, ], "type": "Punctuator", "value": "(", @@ -44015,251 +43280,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 82, - 83, + 25, + 26, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 40, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 84, - 85, + 26, + 27, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 42, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 86, - 87, + 28, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 96, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 97, - 100, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ - 100, - 101, + 29, + 30, ], "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - "value": "A", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 36, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 124, - 125, + 30, + 31, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 38, - "line": 3, + "column": 32, + "line": 1, }, }, "range": Array [ - 126, - 129, + 32, + 33, ], "type": "Identifier", - "value": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 42, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ - 130, - 131, + 34, + 35, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 43, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 131, - 132, + 40, + 46, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 3, + "column": 12, + "line": 2, }, "start": Object { - "column": 44, - "line": 3, + "column": 11, + "line": 2, }, }, "range": Array [ - 132, - 133, + 47, + 48, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 3, + "column": 13, + "line": 2, }, "start": Object { - "column": 46, - "line": 3, + "column": 12, + "line": 2, }, }, "range": Array [ - 134, - 135, + 48, + 49, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 49, + "column": 1, "line": 3, }, "start": Object { - "column": 48, + "column": 0, "line": 3, }, }, "range": Array [ - 136, - 137, + 50, + 51, ], "type": "Punctuator", "value": "}", @@ -44269,172 +43480,47 @@ Object { } `; -exports[`typescript fixtures/basics/type-reference-comments.src 1`] = ` +exports[`typescript fixtures/basics/function-with-types.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 2, }, "start": Object { - "column": 2, + "column": 11, "line": 2, }, }, - "name": "mBuffers", + "name": "name", "range": Array [ - 26, - 34, + 50, + 54, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 51, + "column": 16, "line": 2, }, "start": Object { - "column": 2, + "column": 4, "line": 2, }, }, "range": Array [ - 26, - 75, + 43, + 55, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 34, - 74, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 74, - ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "interop", - "range": Array [ - 36, - 43, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 53, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "Reference", - "range": Array [ - 44, - 53, - ], - "type": "Identifier", - }, - "type": "TSQualifiedName", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 53, - 74, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "value": null, + "type": "ReturnStatement", }, ], "loc": Object { @@ -44443,31 +43529,33 @@ Object { "line": 3, }, "start": Object { - "column": 22, + "column": 37, "line": 1, }, }, "range": Array [ - 22, - 77, + 37, + 57, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "AudioBufferList", + "name": "message", "range": Array [ - 6, - 21, + 9, + 16, ], "type": "Identifier", }, @@ -44481,34 +43569,102 @@ Object { "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 17, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], "range": Array [ 0, - 77, + 57, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, }, - "start": Object { - "column": 34, - "line": 2, + "range": Array [ + 29, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", }, }, - "range": Array [ - 58, - 73, - ], - "type": "Block", - "value": "AudioBuffer", + "type": "FunctionDeclaration", }, ], + "comments": Array [], "loc": Object { "end": Object { "column": 0, @@ -44521,14 +43677,14 @@ Object { }, "range": Array [ 0, - 78, + 58, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -44538,79 +43694,79 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 21, + 9, + 16, ], "type": "Identifier", - "value": "AudioBufferList", + "value": "message", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 34, + 17, + 21, ], "type": "Identifier", - "value": "mBuffers", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 34, - 35, + 21, + 22, ], "type": "Punctuator", "value": ":", @@ -44618,125 +43774,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 36, - 43, + 22, + 28, ], "type": "Identifier", - "value": "interop", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 43, - 44, + 28, + 29, ], "type": "Punctuator", - "value": ".", + "value": ")", }, Object { "loc": Object { "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { "column": 29, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ - 44, - 53, + 30, + 36, ], "type": "Identifier", - "value": "Reference", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 38, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 37, + "line": 1, }, }, "range": Array [ - 53, - 54, + 37, + 38, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 10, "line": 2, }, "start": Object { - "column": 30, + "column": 4, "line": 2, }, }, "range": Array [ - 54, - 57, + 43, + 49, ], - "type": "Identifier", - "value": "any", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 50, + "column": 15, "line": 2, }, "start": Object { - "column": 49, + "column": 11, "line": 2, }, }, "range": Array [ - 73, - 74, + 50, + 54, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 16, "line": 2, }, "start": Object { - "column": 50, + "column": 15, "line": 2, }, }, "range": Array [ - 74, - 75, + 54, + 55, ], "type": "Punctuator", "value": ";", @@ -44753,8 +43927,8 @@ Object { }, }, "range": Array [ - 76, - 77, + 56, + 57, ], "type": "Punctuator", "value": "}", @@ -44764,293 +43938,47 @@ Object { } `; -exports[`typescript fixtures/basics/typed-this.src 1`] = ` +exports[`typescript fixtures/basics/function-with-types-assignation.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 2, }, "start": Object { - "column": 1, + "column": 9, "line": 2, }, }, - "name": "addClickListener", + "name": "name", "range": Array [ - 23, - 39, + 89, + 93, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 65, + "column": 14, "line": 2, }, "start": Object { - "column": 1, + "column": 2, "line": 2, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "onclick", - "range": Array [ - 40, - 79, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 47, - 79, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "name": "this", - "range": Array [ - 50, - 60, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 56, - 60, - ], - "type": "TSVoidKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "name": "e", - "range": Array [ - 62, - 70, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 70, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "name": "Event", - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "range": Array [ - 49, - 79, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 72, - 79, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - }, - }, - }, - ], "range": Array [ - 23, - 87, + 82, + 94, ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 80, - 86, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 60, - "line": 2, - }, - }, - "range": Array [ - 82, - 86, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", + "type": "ReturnStatement", }, ], "loc": Object { @@ -45059,31 +43987,33 @@ Object { "line": 3, }, "start": Object { - "column": 20, + "column": 78, "line": 1, }, }, "range": Array [ - 20, - 89, + 78, + 96, ], - "type": "TSInterfaceBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "UIElement", + "name": "message", "range": Array [ - 10, - 19, + 9, + 16, ], "type": "Identifier", }, @@ -45097,170 +44027,379 @@ Object { "line": 1, }, }, - "range": Array [ - 0, - 89, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "UIElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 17, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "age", + "range": Array [ + 30, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 46, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 46, + ], + "raw": "100", + "type": "Literal", + "value": 100, + }, + "type": "AssignmentPattern", }, - "start": Object { - "column": 1, - "line": 2, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "name": "args", + "range": Array [ + 51, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 69, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 69, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 69, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 68, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 68, + ], + "type": "TSStringKeyword", + }, + ], + "range": Array [ + 61, + 69, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, }, - }, + ], "range": Array [ - 23, - 39, + 0, + 96, ], - "type": "Identifier", - "value": "addClickListener", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, + "returnType": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 70, + "line": 1, + }, }, - "start": Object { - "column": 17, - "line": 2, + "range": Array [ + 70, + 77, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "range": Array [ + 71, + 77, + ], + "type": "TSStringKeyword", }, }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 97, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 40, - 47, + 0, + 8, ], - "type": "Identifier", - "value": "onclick", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 47, - 48, + 9, + 16, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "message", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 49, - 50, + 16, + 17, ], "type": "Punctuator", "value": "(", @@ -45268,35 +44407,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 50, - 54, + 17, + 21, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 54, - 55, + 21, + 22, ], "type": "Punctuator", "value": ":", @@ -45304,35 +44443,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 34, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 56, - 60, + 22, + 28, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 60, - 61, + 28, + 29, ], "type": "Punctuator", "value": ",", @@ -45340,35 +44479,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 40, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ - 62, - 63, + 30, + 33, ], "type": "Identifier", - "value": "e", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 63, - 64, + 33, + 34, ], "type": "Punctuator", "value": ":", @@ -45376,143 +44515,323 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, - "line": 2, + "column": 40, + "line": 1, }, "start": Object { - "column": 43, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 65, - 70, + 34, + 40, ], "type": "Identifier", - "value": "Event", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 48, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 70, - 71, + 41, + 42, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 52, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 50, - "line": 2, + "column": 43, + "line": 1, }, }, "range": Array [ - 72, - 74, + 43, + 46, ], - "type": "Punctuator", - "value": "=>", + "type": "Numeric", + "value": "100", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 47, + "line": 1, }, "start": Object { - "column": 53, - "line": 2, + "column": 46, + "line": 1, }, }, "range": Array [ - 75, - 79, + 46, + 47, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 2, + "column": 51, + "line": 1, }, "start": Object { - "column": 57, - "line": 2, + "column": 48, + "line": 1, }, }, "range": Array [ - 79, - 80, + 48, + 51, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 2, + "column": 55, + "line": 1, }, "start": Object { - "column": 58, - "line": 2, + "column": 51, + "line": 1, }, }, "range": Array [ - 80, - 81, + 51, + 55, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "args", }, Object { "loc": Object { "end": Object { - "column": 64, - "line": 2, + "column": 56, + "line": 1, }, "start": Object { - "column": 60, - "line": 2, - }, + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 68, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 68, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 68, + "line": 1, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 70, + "line": 1, + }, + "start": Object { + "column": 69, + "line": 1, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 70, + "line": 1, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "range": Array [ + 71, + 77, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, }, "range": Array [ 82, - 86, + 88, ], "type": "Keyword", - "value": "void", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 65, + "column": 13, "line": 2, }, "start": Object { - "column": 64, + "column": 9, "line": 2, }, }, "range": Array [ - 86, - 87, + 89, + 93, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 93, + 94, ], "type": "Punctuator", "value": ";", @@ -45529,8 +44848,8 @@ Object { }, }, "range": Array [ - 88, - 89, + 95, + 96, ], "type": "Punctuator", "value": "}", @@ -45540,31 +44859,32 @@ Object { } `; -exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` +exports[`typescript fixtures/basics/import-equal-declaration.src 1`] = ` Object { "body": Array [ Object { "id": Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, - "name": "A", + "name": "foo", "range": Array [ - 5, - 6, + 7, + 10, ], "type": "Identifier", }, + "isExport": false, "loc": Object { "end": Object { - "column": 23, + "column": 28, "line": 1, }, "start": Object { @@ -45572,46 +44892,47 @@ Object { "line": 1, }, }, - "range": Array [ - 0, - 23, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "unique", - "range": Array [ - 9, - 22, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { + "moduleReference": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 22, + "column": 26, "line": 1, }, "start": Object { - "column": 16, + "column": 21, "line": 1, }, }, "range": Array [ - 16, - 22, + 21, + 26, ], - "type": "TSSymbolKeyword", + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "range": Array [ + 13, + 27, + ], + "type": "TSExternalModuleReference", }, + "range": Array [ + 0, + 28, + ], + "type": "TSImportEqualsDeclaration", }, ], "comments": Array [], @@ -45627,14 +44948,14 @@ Object { }, "range": Array [ 0, - 24, + 29, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 6, "line": 1, }, "start": Object { @@ -45644,43 +44965,43 @@ Object { }, "range": Array [ 0, - 4, + 6, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, "range": Array [ - 5, - 6, + 7, + 10, ], "type": "Identifier", - "value": "A", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { - "column": 7, + "column": 11, "line": 1, }, }, "range": Array [ - 7, - 8, + 11, + 12, ], "type": "Punctuator", "value": "=", @@ -45688,53 +45009,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, - 15, + 13, + 20, ], "type": "Identifier", - "value": "unique", + "value": "require", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, - 22, + 20, + 21, ], - "type": "Identifier", - "value": "symbol", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 26, "line": 1, }, "start": Object { - "column": 22, + "column": 21, "line": 1, }, }, "range": Array [ - 22, - 23, + 21, + 26, + ], + "type": "String", + "value": "'bar'", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -45744,87 +45101,103 @@ Object { } `; -exports[`typescript fixtures/basics/var-with-definite-assignment.src 1`] = ` +exports[`typescript fixtures/basics/import-export-equal-declaration.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "TSStringKeyword", - }, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "init": null, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "isExport": true, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "moduleReference": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 16, + "column": 33, "line": 1, }, "start": Object { - "column": 6, + "column": 28, "line": 1, }, }, "range": Array [ - 6, - 16, + 28, + 33, ], - "type": "VariableDeclarator", + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, }, + "range": Array [ + 20, + 34, + ], + "type": "TSExternalModuleReference", + }, + "range": Array [ + 0, + 35, ], - "kind": "const", + "type": "TSImportEqualsDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "module", + "tokens": Array [ + Object { "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { @@ -45834,88 +45207,276 @@ Object { }, "range": Array [ 0, - 17, + 6, ], - "type": "VariableDeclaration", + "type": "Keyword", + "value": "export", }, Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "range": Array [ - 22, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "Identifier", + "value": "require", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 33, + ], + "type": "String", + "value": "'bar'", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/import-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "parameter": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSNumberKeyword", + "start": Object { + "column": 23, + "line": 1, }, }, + "range": Array [ + 23, + 26, + ], + "raw": "'A'", + "type": "Literal", + "value": "A", }, - "init": null, "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 22, - 32, + 23, + 26, ], - "type": "VariableDeclarator", + "type": "TSLiteralType", }, - ], - "kind": "var", + "qualifier": null, + "range": Array [ + 9, + 27, + ], + "type": "TSImportType", + "typeParameters": null, + }, + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "B", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 2, }, "start": Object { @@ -45924,108 +45485,143 @@ Object { }, }, "range": Array [ - 18, - 33, + 29, + 55, ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 2, }, }, - "name": "z", "range": Array [ - 38, + 45, 48, ], - "type": "Identifier", - "typeAnnotation": Object { + "raw": "\\"B\\"", + "type": "Literal", + "value": "B", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 45, + 48, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "range": Array [ + 38, + 54, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 24, + "line": 2, }, "start": Object { - "column": 6, - "line": 3, + "column": 23, + "line": 2, }, }, "range": Array [ - 40, - 48, + 52, + 53, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 24, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 23, + "line": 2, }, }, + "name": "Y", "range": Array [ - 42, - 48, + 52, + 53, ], - "type": "TSObjectKeyword", + "type": "Identifier", }, }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, + ], "range": Array [ - 38, - 48, + 51, + 54, ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 34, - 49, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -46034,14 +45630,14 @@ Object { }, "range": Array [ 0, - 50, + 56, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -46051,28 +45647,28 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "const", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], "type": "Identifier", - "value": "x", + "value": "A", }, Object { "loc": Object { @@ -46090,269 +45686,233 @@ Object { 8, ], "type": "Punctuator", - "value": "!", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 15, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 10, + "column": 16, "line": 1, }, }, "range": Array [ - 10, 16, + 22, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 16, + "column": 22, "line": 1, }, }, "range": Array [ - 16, - 17, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 18, - 21, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, 23, + 26, ], - "type": "Identifier", - "value": "y", + "type": "String", + "value": "'A'", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 23, - 24, + 26, + 27, ], "type": "Punctuator", - "value": "!", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 24, - 25, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 4, "line": 2, }, "start": Object { - "column": 8, + "column": 0, "line": 2, }, }, "range": Array [ - 26, - 32, + 29, + 33, ], "type": "Identifier", - "value": "number", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 2, }, "start": Object { - "column": 14, + "column": 5, "line": 2, }, }, "range": Array [ - 32, - 33, + 34, + 35, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 34, + 36, 37, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ 38, - 39, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, + 44, ], - "type": "Punctuator", - "value": "!", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 16, + "line": 2, }, "start": Object { - "column": 6, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 40, - 41, + 44, + 45, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 42, + 45, 48, ], - "type": "Identifier", - "value": "object", + "type": "String", + "value": "\\"B\\"", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 2, }, }, "range": Array [ @@ -46360,604 +45920,327 @@ Object { 49, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/var-with-dotted-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 14, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "type": "TSQualifiedName", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "C", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "type": "TSQualifiedName", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "value": ")", }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 0, - 3, + 49, + 50, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 4, - 7, + 50, + 51, ], "type": "Identifier", - "value": "foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 7, - 8, + 51, + 52, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 9, - 10, + 52, + 53, ], "type": "Identifier", - "value": "A", + "value": "Y", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 10, - 11, + 53, + 54, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "B", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 12, - 13, + 54, + 55, ], "type": "Punctuator", - "value": ".", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-reference.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "name": "X", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "C", - }, - Object { "loc": Object { "end": Object { - "column": 15, + "column": 30, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 30, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/var-with-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "name": "name", - "range": Array [ - 4, - 15, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "isTypeOf": false, "loc": Object { "end": Object { - "column": 15, + "column": 28, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, - "range": Array [ - 8, - 15, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "parameter": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 9, + "column": 18, "line": 1, }, }, "range": Array [ - 9, - 15, + 18, + 20, ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 28, - ], - "raw": "\\"Nicholas\\"", - "type": "Literal", - "value": "Nicholas", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "TSLiteralType", }, - }, - "name": "foo", - "range": Array [ - 34, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, }, + "name": "B", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", }, "range": Array [ - 37, - 45, + 11, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSImportType", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 23, + "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 27, + ], + "type": "TSAnyKeyword", + }, + ], "range": Array [ - 39, - 45, + 23, + 28, ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 48, - 53, - ], - "raw": "\\"Bar\\"", - "type": "Literal", - "value": "Bar", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, + ], "range": Array [ - 34, - 53, + 10, + 29, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 30, - 54, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -46966,14 +46249,14 @@ Object { }, "range": Array [ 0, - 55, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 4, "line": 1, }, "start": Object { @@ -46983,51 +46266,51 @@ Object { }, "range": Array [ 0, - 3, + 4, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 8, + 5, + 6, ], "type": "Identifier", - "value": "name", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 8, - 9, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -47037,10 +46320,28 @@ Object { }, "range": Array [ 9, - 15, + 10, ], "type": "Identifier", - "value": "string", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { @@ -47049,21 +46350,39 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 1, }, "start": Object { @@ -47073,151 +46392,151 @@ Object { }, "range": Array [ 18, - 28, + 20, ], "type": "String", - "value": "\\"Nicholas\\"", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 28, + "column": 20, "line": 1, }, }, "range": Array [ - 28, - 29, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 30, - 33, + 21, + 22, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 34, - 37, + 22, + 23, ], "type": "Identifier", - "value": "foo", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 37, - 38, + 23, + 24, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 39, - 45, + 24, + 27, ], "type": "Identifier", - "value": "string", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 46, - 47, + 27, + 28, ], "type": "Punctuator", - "value": "=", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 48, - 53, + 28, + 29, ], - "type": "String", - "value": "\\"Bar\\"", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 53, - 54, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -47227,87 +46546,87 @@ Object { } `; -exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` +exports[`typescript fixtures/basics/interface-extends.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 30, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ Object { - "id": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, - "name": "x", + "name": "Bar", "range": Array [ - 4, - 21, + 22, + 25, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSStringKeyword", - }, - }, }, - "init": null, "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, "range": Array [ - 4, - 21, + 22, + 25, ], - "type": "VariableDeclarator", + "type": "TSInterfaceHeritage", }, ], - "kind": "let", + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -47316,16 +46635,16 @@ Object { }, "range": Array [ 0, - 22, + 30, ], - "type": "VariableDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -47334,14 +46653,14 @@ Object { }, "range": Array [ 0, - 22, + 31, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { @@ -47351,357 +46670,222 @@ Object { }, "range": Array [ 0, - 3, + 9, ], "type": "Keyword", - "value": "let", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 13, ], "type": "Identifier", - "value": "x", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 9, + 14, + 21, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 22, "line": 1, }, }, "range": Array [ - 15, - 21, + 22, + 25, ], "type": "Identifier", - "value": "string", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 27, "line": 1, }, "start": Object { - "column": 21, + "column": 26, "line": 1, }, }, "range": Array [ - 21, - 22, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 32, - 37, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "configurable", - "range": Array [ - 19, - 31, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 38, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 38, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - }, - "kind": "get", + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 34, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 22, + "line": 1, }, }, + "name": "Bar", "range": Array [ - 18, - 70, + 22, + 25, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 60, - 64, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_x", - "range": Array [ - 65, - 67, - ], - "type": "Identifier", - }, - "range": Array [ - 60, - 67, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 68, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 70, - ], - "type": "BlockStatement", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "TSInterfaceHeritage", + }, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, + "start": Object { + "column": 26, + "line": 1, }, - "params": Array [], - "range": Array [ - 48, - 70, - ], - "type": "FunctionExpression", }, + "name": "Baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 1, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "range": Array [ + 26, + 29, + ], + "type": "TSInterfaceHeritage", }, - "range": Array [ - 12, - 72, - ], - "type": "ClassBody", - }, + ], "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "Point", + "name": "Foo", "range": Array [ - 6, - 11, + 10, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -47710,16 +46894,15 @@ Object { }, "range": Array [ 0, - 72, + 34, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 4, }, "start": Object { @@ -47729,14 +46912,14 @@ Object { }, "range": Array [ 0, - 72, + 35, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -47746,349 +46929,392 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 11, + 10, + 13, ], "type": "Identifier", - "value": "Point", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 21, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, + 14, + 21, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 19, - 31, + 22, + 25, ], "type": "Identifier", - "value": "configurable", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 31, - 32, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 32, - 37, + 26, + 29, ], - "type": "Boolean", - "value": "false", + "type": "Identifier", + "value": "Baz", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ - 37, - 38, + 30, + 31, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 1, "line": 3, }, "start": Object { - "column": 4, + "column": 0, "line": 3, }, }, "range": Array [ - 43, - 46, + 33, + 34, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 1, + }, }, + "range": Array [ + 17, + 21, + ], + "type": "TSInterfaceBody", }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "(", - }, - Object { "loc": Object { "end": Object { - "column": 11, + "column": 1, "line": 3, }, "start": Object { - "column": 10, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 49, - 50, + 0, + 21, ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, + "type": "TSInterfaceDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 13, + 16, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "{", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 9, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 53, - 59, + 0, + 9, ], "type": "Keyword", - "value": "return", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 21, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 60, - 64, + 10, + 13, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 25, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 64, - 65, + 13, + 14, ], "type": "Punctuator", - "value": ".", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 65, - 67, + 14, + 15, ], "type": "Identifier", - "value": "_x", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 28, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 67, - 68, + 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 30, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 69, - 70, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 3, }, }, "range": Array [ - 71, - 72, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -48098,7 +47324,7 @@ Object { } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` Object { "body": Array [ Object { @@ -48106,1042 +47332,1275 @@ Object { "body": Array [ Object { "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 25, - 34, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 30, - 34, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - }, - ], - "range": Array [ - 23, - 36, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 37, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 37, - ], - "type": "Decorator", - }, - ], "key": Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { - "column": 15, - "line": 3, - }, + "column": 4, + "line": 2, + }, + }, + "name": "baa", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 32, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 31, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, }, "name": "bar", "range": Array [ - 53, - 56, + 37, + 40, ], "type": "Identifier", }, - "kind": "get", "loc": Object { "end": Object { - "column": 42, + "column": 17, "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, + "optional": true, "range": Array [ - 18, - 80, + 37, + 50, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 72, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "name": "_bar", - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - }, - "range": Array [ - 68, - 77, - ], - "type": "MemberExpression", + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 41, + 49, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "name": "bax", + "range": Array [ + 56, + 59, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 55, + 69, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 60, + 68, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 62, + 68, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "name": "baz", + "range": Array [ + 75, + 78, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "optional": true, + "range": Array [ + 74, + 89, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 5, + }, + }, + "range": Array [ + 80, + 88, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 82, + 88, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 5, + "line": 6, + }, + }, + "name": "eee", + "range": Array [ + 95, + 106, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, }, + }, + "range": Array [ + 98, + 106, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 40, - "line": 3, + "column": 16, + "line": 6, }, "start": Object { - "column": 23, - "line": 3, + "column": 10, + "line": 6, }, }, "range": Array [ - 61, - 78, + 100, + 106, ], - "type": "ReturnStatement", + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 94, + 116, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, + }, + "range": Array [ + 107, + 115, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, }, + }, + "range": Array [ + 109, + 115, ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "parameters": Array [ + Object { "loc": Object { "end": Object { - "column": 42, - "line": 3, + "column": 17, + "line": 7, }, "start": Object { - "column": 21, - "line": 3, + "column": 5, + "line": 7, }, }, + "name": "fff", + "optional": true, "range": Array [ - 59, - 80, + 122, + 134, ], - "type": "BlockStatement", + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 126, + 134, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 128, + 134, + ], + "type": "TSNumberKeyword", + }, + }, }, - "expression": false, - "generator": false, - "id": null, + ], + "range": Array [ + 121, + 144, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 42, - "line": 3, + "column": 26, + "line": 7, }, "start": Object { "column": 18, - "line": 3, + "line": 7, }, }, - "params": Array [], "range": Array [ - 56, - 80, + 135, + 143, ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "range": Array [ + 137, + 143, + ], + "type": "TSStringKeyword", + }, + }, }, - "start": Object { - "column": 12, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "name": "doo", + "range": Array [ + 149, + 152, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "params": Array [], + "range": Array [ + 149, + 161, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 154, + 160, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, + }, + }, + "range": Array [ + 156, + 160, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", }, - }, - "range": Array [ - 12, - 82, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "name": "doo", + "range": Array [ + 166, + 169, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "optional": true, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 9, + "line": 9, + }, + }, + "name": "a", + "range": Array [ + 171, + 172, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "name": "b", + "range": Array [ + 174, + 175, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 15, + "line": 9, + }, + }, + "name": "c", + "range": Array [ + 177, + 178, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 166, + 186, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "range": Array [ + 179, + 185, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 9, + }, + }, + "range": Array [ + 181, + 185, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", }, - "start": Object { - "column": 6, - "line": 1, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 10, + }, + "start": Object { + "column": 5, + "line": 10, + }, + }, + "name": "loo", + "range": Array [ + 192, + 195, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 10, + }, + }, + "optional": true, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 10, + }, + "start": Object { + "column": 11, + "line": 10, + }, + }, + "name": "a", + "range": Array [ + 198, + 199, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 10, + }, + "start": Object { + "column": 14, + "line": 10, + }, + }, + "name": "b", + "range": Array [ + 201, + 202, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 10, + }, + "start": Object { + "column": 17, + "line": 10, + }, + }, + "name": "c", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 191, + 213, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 10, + }, + "start": Object { + "column": 19, + "line": 10, + }, + }, + "range": Array [ + 206, + 212, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 10, + }, + "start": Object { + "column": 21, + "line": 10, + }, + }, + "range": Array [ + 208, + 212, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", }, - }, - "name": "Other", - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "value": "Other", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 30, - 34, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 72, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - "value": "_bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ Object { "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "hidden", - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Decorator", - }, - ], "key": Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 7, + "line": 11, }, "start": Object { - "column": 8, - "line": 3, + "column": 4, + "line": 11, }, }, - "name": "z", + "name": "boo", "range": Array [ - 30, - 31, + 218, + 221, ], "type": "Identifier", }, - "kind": "get", "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 26, + "line": 11, }, "start": Object { "column": 4, - "line": 2, + "line": 11, }, }, - "range": Array [ - 14, - 53, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_z", - "range": Array [ - 48, - 50, - ], - "type": "Identifier", - }, - "range": Array [ - 43, - 50, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 51, - ], - "type": "ReturnStatement", - }, - ], + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 12, + "line": 11, }, "start": Object { - "column": 12, - "line": 3, + "column": 11, + "line": 11, }, }, + "name": "a", "range": Array [ - 34, - 53, + 225, + 226, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 11, + }, + "start": Object { + "column": 14, + "line": 11, + }, + }, + "name": "b", + "range": Array [ + 228, + 229, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 11, + }, + "start": Object { + "column": 17, + "line": 11, + }, + }, + "name": "c", + "range": Array [ + 231, + 232, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 218, + 240, + ], + "returnType": Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 25, + "line": 11, }, "start": Object { - "column": 9, - "line": 3, + "column": 19, + "line": 11, }, }, - "params": Array [], "range": Array [ - 31, - 53, + 233, + 239, ], - "type": "FunctionExpression", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 11, + }, + "start": Object { + "column": 21, + "line": 11, + }, + }, + "range": Array [ + 235, + 239, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 11, + }, + "start": Object { + "column": 7, + "line": 11, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 11, + }, + "start": Object { + "column": 8, + "line": 11, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 11, + }, + "start": Object { + "column": 8, + "line": 11, + }, + }, + "name": "J", + "range": Array [ + 222, + 223, + ], + "type": "Identifier", + }, + "range": Array [ + 222, + 223, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 221, + 224, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 12, + }, + "start": Object { + "column": 9, + "line": 12, + }, + }, + "name": "a", + "range": Array [ + 250, + 251, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 12, + }, + "start": Object { + "column": 12, + "line": 12, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 253, + 254, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 245, + 265, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 12, + }, + "start": Object { + "column": 15, + "line": 12, + }, + }, + "range": Array [ + 256, + 264, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 12, + }, + "start": Object { + "column": 17, + "line": 12, + }, + }, + "range": Array [ + 258, + 264, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSConstructSignatureDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 13, + }, + "start": Object { + "column": 12, + "line": 13, + }, + }, + "name": "a", + "range": Array [ + 278, + 279, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 13, + }, + "start": Object { + "column": 15, + "line": 13, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 281, + 282, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 270, + 293, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { + "column": 18, + "line": 13, + }, + }, + "range": Array [ + 284, + 292, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { + "column": 20, + "line": 13, + }, + }, + "range": Array [ + 286, + 292, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSConstructSignatureDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "name": "F", + "range": Array [ + 275, + 276, + ], + "type": "Identifier", + }, + "range": Array [ + 275, + 276, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 274, + 277, + ], + "type": "TSTypeParameterDeclaration", }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 14, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 55, + 14, + 295, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "P", + "name": "Foo", "range": Array [ - 6, - 7, + 10, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 14, }, "start": Object { "column": 0, @@ -49150,17 +48609,16 @@ Object { }, "range": Array [ 0, - 55, + 295, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 16, }, "start": Object { "column": 0, @@ -49169,14 +48627,14 @@ Object { }, "range": Array [ 0, - 55, + 297, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -49186,43 +48644,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 13, ], "type": "Identifier", - "value": "P", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 9, + 14, + 15, ], "type": "Punctuator", "value": "{", @@ -49230,7 +48688,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 2, }, "start": Object { @@ -49239,888 +48697,692 @@ Object { }, }, "range": Array [ - 14, - 15, + 20, + 23, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "baa", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 2, }, "start": Object { - "column": 5, + "column": 7, "line": 2, }, }, "range": Array [ - 15, - 21, + 23, + 24, ], - "type": "Identifier", - "value": "hidden", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 26, - 29, + 25, + 31, ], "type": "Identifier", - "value": "get", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 16, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 30, 31, + 32, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 3, }, "start": Object { - "column": 9, + "column": 4, "line": 3, }, }, "range": Array [ - 31, - 32, + 37, + 40, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 3, }, "start": Object { - "column": 10, + "column": 7, "line": 3, }, }, "range": Array [ - 32, - 33, + 40, + 41, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 3, }, "start": Object { - "column": 12, + "column": 8, "line": 3, }, }, "range": Array [ - 34, - 35, + 41, + 42, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 16, "line": 3, }, "start": Object { - "column": 14, + "column": 10, "line": 3, }, }, "range": Array [ - 36, - 42, + 43, + 49, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 3, }, "start": Object { - "column": 21, + "column": 16, "line": 3, }, }, "range": Array [ - 43, - 47, + 49, + 50, ], - "type": "Keyword", - "value": "this", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 3, + "column": 5, + "line": 4, }, "start": Object { - "column": 25, - "line": 3, + "column": 4, + "line": 4, }, }, "range": Array [ - 47, - 48, + 55, + 56, ], "type": "Punctuator", - "value": ".", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 4, }, "start": Object { - "column": 26, - "line": 3, + "column": 5, + "line": 4, }, }, "range": Array [ - 48, - 50, + 56, + 59, ], "type": "Identifier", - "value": "_z", + "value": "bax", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 9, + "line": 4, }, "start": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 4, }, }, "range": Array [ - 50, - 51, + 59, + 60, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 10, + "line": 4, }, "start": Object { - "column": 30, - "line": 3, + "column": 9, + "line": 4, }, }, "range": Array [ - 52, - 53, + 60, + 61, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 17, "line": 4, }, "start": Object { - "column": 0, + "column": 11, "line": 4, }, }, "range": Array [ - 54, - 55, + 62, + 68, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "string", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "adminonly", - "range": Array [ - 18, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "y", - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 76, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "_y", - "range": Array [ - 63, - 65, - ], - "type": "Identifier", - }, - "range": Array [ - 58, - 65, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "operator": "=", - "range": Array [ - 58, - 69, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "a", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 70, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 48, - 76, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 44, - 76, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 78, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "User", - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 18, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 0, - 78, + 68, + 69, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 78, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 0, - 5, + 74, + 75, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, + "column": 5, + "line": 5, }, }, "range": Array [ - 6, - 10, + 75, + 78, ], "type": "Identifier", - "value": "User", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 11, - 12, + 78, + 79, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 10, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 5, }, }, "range": Array [ - 17, - 18, + 79, + 80, ], "type": "Punctuator", - "value": "@", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 11, + "line": 5, }, "start": Object { - "column": 5, - "line": 2, + "column": 10, + "line": 5, }, }, "range": Array [ - 18, - 27, + 80, + 81, ], - "type": "Identifier", - "value": "adminonly", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 18, + "line": 5, }, "start": Object { - "column": 4, - "line": 3, + "column": 12, + "line": 5, }, }, "range": Array [ - 32, - 38, + 82, + 88, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 5, }, "start": Object { - "column": 11, - "line": 3, + "column": 18, + "line": 5, }, }, "range": Array [ - 39, - 42, + 88, + 89, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 5, + "line": 6, }, "start": Object { - "column": 15, - "line": 3, + "column": 4, + "line": 6, }, }, "range": Array [ - 43, - 44, + 94, + 95, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 5, + "line": 6, + }, + }, + "range": Array [ + 95, + 98, ], "type": "Identifier", - "value": "y", + "value": "eee", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 6, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 3, + "line": 6, }, "start": Object { "column": 16, - "line": 3, + "line": 6, }, }, "range": Array [ - 44, - 45, + 106, + 107, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 3, + "line": 6, }, "start": Object { "column": 17, - "line": 3, + "line": 6, }, }, "range": Array [ - 45, - 46, + 107, + 108, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { "column": 19, - "line": 3, + "line": 6, + }, + }, + "range": Array [ + 109, + 115, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, }, "start": Object { - "column": 18, - "line": 3, + "column": 25, + "line": 6, }, }, "range": Array [ - 46, - 47, + 115, + 116, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 5, + "line": 7, }, "start": Object { - "column": 20, - "line": 3, + "column": 4, + "line": 7, }, }, "range": Array [ - 48, - 49, + 121, + 122, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 8, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, + }, + }, + "range": Array [ + 122, + 125, + ], + "type": "Identifier", + "value": "fff", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, }, "start": Object { "column": 8, - "line": 4, + "line": 7, }, }, "range": Array [ - 58, - 62, + 125, + 126, ], - "type": "Keyword", - "value": "this", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 10, + "line": 7, }, "start": Object { - "column": 12, - "line": 4, + "column": 9, + "line": 7, }, }, "range": Array [ - 62, - 63, + 126, + 127, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 4, + "column": 17, + "line": 7, }, "start": Object { - "column": 13, - "line": 4, + "column": 11, + "line": 7, }, }, "range": Array [ - 63, - 65, + 128, + 134, ], "type": "Identifier", - "value": "_y", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 18, + "line": 7, }, "start": Object { - "column": 16, - "line": 4, + "column": 17, + "line": 7, }, }, "range": Array [ - 66, - 67, + 134, + 135, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 4, + "line": 7, }, "start": Object { "column": 18, - "line": 4, + "line": 7, }, }, "range": Array [ - 68, - 69, + 135, + 136, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 26, + "line": 7, + }, + "start": Object { "column": 20, - "line": 4, + "line": 7, + }, + }, + "range": Array [ + 137, + 143, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 7, }, "start": Object { - "column": 19, - "line": 4, + "column": 26, + "line": 7, }, }, "range": Array [ - 69, - 70, + 143, + 144, ], "type": "Punctuator", "value": ";", @@ -50128,617 +49390,485 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 7, + "line": 8, }, "start": Object { "column": 4, - "line": 5, + "line": 8, }, }, "range": Array [ - 75, - 76, + 149, + 152, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "doo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 8, + "line": 8, }, "start": Object { - "column": 0, - "line": 6, + "column": 7, + "line": 8, }, }, "range": Array [ - 77, - 78, + 152, + 153, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/class-decorators/class-decorator.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 9, + "line": 8, }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sealed", - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", + "start": Object { + "column": 8, + "line": 8, }, + }, + "range": Array [ + 153, + 154, ], - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, }, - "name": "Qux", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", }, + "range": Array [ + 154, + 155, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 15, + "line": 8, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 0, - 20, + 156, + 160, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "void", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 16, + "line": 8, }, "start": Object { - "column": 0, - "line": 1, + "column": 15, + "line": 8, }, }, "range": Array [ - 0, - 1, + 160, + 161, ], "type": "Punctuator", - "value": "@", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 9, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 9, }, }, "range": Array [ - 1, - 7, + 166, + 169, ], "type": "Identifier", - "value": "sealed", + "value": "doo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 8, + "line": 9, }, "start": Object { - "column": 0, - "line": 2, + "column": 7, + "line": 9, }, }, "range": Array [ - 8, - 13, + 169, + 170, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 9, }, "start": Object { - "column": 6, - "line": 2, + "column": 8, + "line": 9, }, }, "range": Array [ - 14, - 17, + 170, + 171, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 9, + "line": 9, + }, + }, + "range": Array [ + 171, + 172, ], "type": "Identifier", - "value": "Qux", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 9, }, "start": Object { "column": 10, - "line": 2, + "line": 9, }, }, "range": Array [ - 18, - 19, + 172, + 173, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 13, + "line": 9, }, "start": Object { - "column": 11, - "line": 2, + "column": 12, + "line": 9, }, }, "range": Array [ - 19, - 20, + 174, + 175, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "b", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/class-decorators/class-decorator-factory.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, + "loc": Object { + "end": Object { + "column": 14, + "line": 9, + }, + "start": Object { + "column": 13, + "line": 9, }, - "range": Array [ - 56, - 58, - ], - "type": "ClassBody", }, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "selector", - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 17, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - }, - ], - "range": Array [ - 11, - 35, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "Component", - "range": Array [ - 1, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 36, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "Decorator", + "range": Array [ + 175, + 176, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 15, + "line": 9, }, + }, + "range": Array [ + 177, + 178, ], - "id": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, }, - "name": "FooComponent", - "range": Array [ - 43, - 55, - ], - "type": "Identifier", }, + "range": Array [ + 178, + 179, + ], + "type": "Punctuator", + "value": ")", + }, + Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 18, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 9, }, }, "range": Array [ - 0, - 58, + 179, + 180, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": ":", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 9, + }, + }, + "range": Array [ + 181, + 185, + ], + "type": "Keyword", + "value": "void", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 23, + "line": 9, + }, + }, + "range": Array [ + 185, + 186, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 58, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 10, }, }, "range": Array [ - 0, - 1, + 191, + 192, ], "type": "Punctuator", - "value": "@", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 10, }, "start": Object { - "column": 1, - "line": 1, + "column": 5, + "line": 10, }, }, "range": Array [ - 1, - 10, + 192, + 195, ], "type": "Identifier", - "value": "Component", + "value": "loo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 9, + "line": 10, }, "start": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 10, }, }, "range": Array [ - 10, - 11, + 195, + 196, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 10, + "line": 10, }, "start": Object { + "column": 9, + "line": 10, + }, + }, + "range": Array [ + 196, + 197, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { "column": 11, - "line": 1, + "line": 10, + }, + "start": Object { + "column": 10, + "line": 10, }, }, "range": Array [ - 11, - 12, + 197, + 198, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 10, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 10, }, }, "range": Array [ - 17, - 25, + 198, + 199, ], "type": "Identifier", - "value": "selector", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 2, + "line": 10, }, "start": Object { "column": 12, - "line": 2, + "line": 10, }, }, "range": Array [ - 25, - 26, + 199, + 200, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 15, + "line": 10, }, "start": Object { "column": 14, - "line": 2, + "line": 10, }, }, "range": Array [ - 27, - 32, + 201, + 202, ], - "type": "String", - "value": "'foo'", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 16, + "line": 10, }, "start": Object { - "column": 19, - "line": 2, + "column": 15, + "line": 10, }, }, "range": Array [ - 32, - 33, + 202, + 203, ], "type": "Punctuator", "value": ",", @@ -50746,35 +49876,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 10, }, "start": Object { - "column": 0, - "line": 3, + "column": 17, + "line": 10, }, }, "range": Array [ - 34, - 35, + 204, + 205, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 19, + "line": 10, }, "start": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 10, }, }, "range": Array [ - 35, - 36, + 205, + 206, ], "type": "Punctuator", "value": ")", @@ -50782,485 +49912,341 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 20, + "line": 10, }, "start": Object { - "column": 0, - "line": 4, + "column": 19, + "line": 10, }, }, "range": Array [ - 37, - 42, + 206, + 207, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 25, + "line": 10, }, "start": Object { - "column": 6, - "line": 4, + "column": 21, + "line": 10, }, }, "range": Array [ - 43, - 55, + 208, + 212, ], - "type": "Identifier", - "value": "FooComponent", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 4, + "column": 26, + "line": 10, }, "start": Object { - "column": 19, - "line": 4, + "column": 25, + "line": 10, }, }, "range": Array [ - 56, - 57, + 212, + 213, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 7, + "line": 11, }, "start": Object { - "column": 20, - "line": 4, + "column": 4, + "line": 11, }, }, "range": Array [ - 57, - 58, + 218, + 221, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "boo", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 29, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "onlyRead", - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 30, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "instanceMethod", - "range": Array [ - 35, - 49, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 54, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 8, + "line": 11, }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 11, }, - "name": "B", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, + "range": Array [ + 221, + 222, + ], + "type": "Punctuator", + "value": "<", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 9, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 11, }, }, "range": Array [ - 0, - 56, + 222, + 223, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, + "type": "Identifier", + "value": "J", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 11, + }, + "start": Object { + "column": 9, + "line": 11, + }, + }, + "range": Array [ + 223, + 224, + ], + "type": "Punctuator", + "value": ">", }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 11, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 11, }, }, "range": Array [ - 0, - 5, + 224, + 225, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 11, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 11, }, }, "range": Array [ - 6, - 7, + 225, + 226, ], "type": "Identifier", - "value": "B", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 11, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 11, }, }, "range": Array [ - 8, - 9, + 226, + 227, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 11, }, "start": Object { - "column": 4, - "line": 2, + "column": 14, + "line": 11, }, }, "range": Array [ - 14, - 15, + 228, + 229, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 11, + }, + "start": Object { + "column": 15, + "line": 11, + }, + }, + "range": Array [ + 229, + 230, ], "type": "Punctuator", - "value": "@", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 18, + "line": 11, }, "start": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 11, }, }, "range": Array [ - 15, - 23, + 231, + 232, ], "type": "Identifier", - "value": "onlyRead", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 19, + "line": 11, }, "start": Object { - "column": 13, - "line": 2, + "column": 18, + "line": 11, }, }, "range": Array [ - 23, - 24, + 232, + 233, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { + "column": 20, + "line": 11, + }, + "start": Object { "column": 19, - "line": 2, + "line": 11, + }, + }, + "range": Array [ + 233, + 234, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 11, }, "start": Object { - "column": 14, - "line": 2, + "column": 21, + "line": 11, }, }, "range": Array [ - 24, - 29, + 235, + 239, ], - "type": "Boolean", - "value": "false", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 26, + "line": 11, }, "start": Object { - "column": 19, - "line": 2, + "column": 25, + "line": 11, }, }, "range": Array [ - 29, - 30, + 239, + 240, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 7, + "line": 12, }, "start": Object { "column": 4, - "line": 3, + "line": 12, }, }, "range": Array [ - 35, - 49, + 245, + 248, ], - "type": "Identifier", - "value": "instanceMethod", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 9, + "line": 12, }, "start": Object { - "column": 18, - "line": 3, + "column": 8, + "line": 12, }, }, "range": Array [ - 49, - 50, + 249, + 250, ], "type": "Punctuator", "value": "(", @@ -51268,413 +50254,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 10, + "line": 12, }, "start": Object { - "column": 19, - "line": 3, + "column": 9, + "line": 12, }, }, "range": Array [ - 50, - 51, + 250, + 251, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 11, + "line": 12, }, "start": Object { - "column": 21, - "line": 3, + "column": 10, + "line": 12, }, }, "range": Array [ - 52, - 53, + 251, + 252, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 13, + "line": 12, }, "start": Object { - "column": 22, - "line": 3, + "column": 12, + "line": 12, }, }, "range": Array [ - 53, - 54, + 253, + 254, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 12, + }, + "start": Object { + "column": 13, + "line": 12, + }, + }, + "range": Array [ + 254, + 255, ], "type": "Punctuator", - "value": "}", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 12, }, "start": Object { - "column": 0, - "line": 4, + "column": 14, + "line": 12, }, }, "range": Array [ - 55, - 56, + 255, + 256, ], "type": "Punctuator", - "value": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 25, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "staticMethod", - "range": Array [ - 37, - 49, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 54, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 16, + "line": 12, }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 15, + "line": 12, }, - "name": "C", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, + "range": Array [ + 256, + 257, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 12, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 12, }, }, "range": Array [ - 0, - 56, + 258, + 264, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "string", }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 24, + "line": 12, }, "start": Object { - "column": 0, - "line": 1, + "column": 23, + "line": 12, }, }, "range": Array [ - 0, - 5, + 264, + 265, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 13, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 13, }, }, "range": Array [ - 6, - 7, + 270, + 273, ], - "type": "Identifier", - "value": "C", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 13, }, "start": Object { "column": 8, - "line": 1, + "line": 13, }, }, "range": Array [ - 8, - 9, + 274, + 275, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 10, + "line": 13, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 13, }, }, "range": Array [ - 14, - 15, + 275, + 276, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "F", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 13, }, "start": Object { - "column": 5, - "line": 2, + "column": 10, + "line": 13, }, }, "range": Array [ - 15, - 18, + 276, + 277, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 13, }, "start": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 13, }, }, "range": Array [ - 18, - 19, + 277, + 278, ], "type": "Punctuator", "value": "(", @@ -51682,161 +50488,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 13, }, "start": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 13, }, }, "range": Array [ - 19, - 24, + 278, + 279, ], - "type": "Boolean", - "value": "false", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 14, + "line": 13, }, "start": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 13, }, }, "range": Array [ - 24, - 25, + 279, + 280, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 16, + "line": 13, }, "start": Object { - "column": 4, - "line": 3, + "column": 15, + "line": 13, }, }, "range": Array [ - 30, - 36, + 281, + 282, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 17, + "line": 13, }, "start": Object { - "column": 11, - "line": 3, + "column": 16, + "line": 13, }, }, "range": Array [ - 37, - 49, + 282, + 283, ], - "type": "Identifier", - "value": "staticMethod", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 18, + "line": 13, }, "start": Object { - "column": 23, - "line": 3, + "column": 17, + "line": 13, }, }, "range": Array [ - 49, - 50, + 283, + 284, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 19, + "line": 13, }, "start": Object { - "column": 24, - "line": 3, + "column": 18, + "line": 13, }, }, "range": Array [ - 50, - 51, + 284, + 285, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 26, + "line": 13, }, "start": Object { - "column": 26, - "line": 3, + "column": 20, + "line": 13, }, }, "range": Array [ - 52, - 53, + 286, + 292, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 27, + "line": 13, }, "start": Object { - "column": 27, - "line": 3, + "column": 26, + "line": 13, }, }, "range": Array [ - 53, - 54, + 292, + 293, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 14, }, "start": Object { "column": 0, - "line": 4, + "line": 14, }, }, "range": Array [ - 55, - 56, + 294, + 295, ], "type": "Punctuator", "value": "}", @@ -51846,166 +50652,142 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "computed": false, - "decorators": Array [ + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ Object { - "expression": Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { "loc": Object { "end": Object { - "column": 13, + "column": 17, "line": 2, }, "start": Object { - "column": 5, + "column": 16, "line": 2, }, }, - "name": "onlyRead", + "name": "x", "range": Array [ - 15, - 23, + 33, + 34, ], "type": "Identifier", }, + "range": Array [ + 26, + 34, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 2, }, "start": Object { - "column": 4, + "column": 19, "line": 2, }, }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "name": "y", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, "range": Array [ - 14, - 23, + 36, + 45, ], - "type": "Decorator", + "type": "TSParameterProperty", }, ], - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "instanceMethod", - "range": Array [ - 28, - 42, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, "range": Array [ - 14, + 21, 47, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 45, - 47, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 42, - 47, - ], - "type": "FunctionExpression", - }, + "type": "TSConstructSignatureDeclaration", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, + 15, 49, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "A", + "name": "Test", "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -52016,15 +50798,14 @@ Object { 0, 49, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -52040,7 +50821,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -52050,43 +50831,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", - "value": "A", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 9, + 15, + 16, ], "type": "Punctuator", "value": "{", @@ -52094,7 +50875,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 2, }, "start": Object { @@ -52103,93 +50884,129 @@ Object { }, }, "range": Array [ - 14, - 15, + 21, + 24, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, ], "type": "Punctuator", - "value": "@", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 2, }, "start": Object { - "column": 5, + "column": 9, "line": 2, }, }, "range": Array [ - 15, - 23, + 26, + 32, ], - "type": "Identifier", - "value": "onlyRead", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 28, - 42, + 33, + 34, ], "type": "Identifier", - "value": "instanceMethod", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 17, + "line": 2, }, }, "range": Array [ - 42, - 43, + 34, + 35, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { "column": 19, - "line": 3, + "line": 2, }, }, "range": Array [ + 36, 43, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ 44, + 45, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 29, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 28, + "line": 2, }, }, "range": Array [ @@ -52197,17 +51014,17 @@ Object { 46, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 30, + "line": 2, }, "start": Object { - "column": 22, - "line": 3, + "column": 29, + "line": 2, }, }, "range": Array [ @@ -52215,17 +51032,17 @@ Object { 47, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 3, }, }, "range": Array [ @@ -52240,166 +51057,123 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-extends-member-expression.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - ], - "key": Object { + "start": Object { + "column": 22, + "line": 1, + }, + }, + "object": Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 22, + "line": 1, }, }, - "name": "staticMethod", + "name": "bar", "range": Array [ - 30, - 42, + 22, + 25, ], "type": "Identifier", }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 47, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 45, - 47, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "property": Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 26, + "line": 1, }, }, - "params": Array [], + "name": "baz", "range": Array [ - 42, - 47, + 26, + 29, ], - "type": "FunctionExpression", + "type": "Identifier", }, + "range": Array [ + 22, + 29, + ], + "type": "MemberExpression", }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, }, + "range": Array [ + 22, + 29, + ], + "type": "TSInterfaceHeritage", }, - "range": Array [ - 8, - 49, - ], - "type": "ClassBody", - }, + ], "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "D", + "name": "foo", "range": Array [ - 6, - 7, + 10, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -52408,17 +51182,16 @@ Object { }, "range": Array [ 0, - 49, + 33, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 3, }, "start": Object { "column": 0, @@ -52427,14 +51200,14 @@ Object { }, "range": Array [ 0, - 50, + 34, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -52444,205 +51217,573 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 13, ], "type": "Identifier", - "value": "D", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 9, + 14, + 21, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 14, - 15, + 22, + 25, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 15, - 18, + 25, + 26, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 23, + 26, 29, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ 30, - 42, + 31, ], - "type": "Identifier", - "value": "staticMethod", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 1, + "line": 2, }, "start": Object { - "column": 23, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 42, - 43, + 32, + 33, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 36, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "TSInterfaceHeritage", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "J", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 28, + 31, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 25, + "column": 1, "line": 3, }, "start": Object { - "column": 24, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 43, - 44, + 0, + 36, + ], + "type": "TSInterfaceDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 13, + 16, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 45, - 46, + 14, + 15, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 24, + ], + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { "column": 28, - "line": 3, + "line": 1, }, "start": Object { - "column": 27, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 46, - 47, + 25, + 28, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", - "value": "}", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + "value": "J", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 3, }, }, "range": Array [ - 48, - 49, + 35, + 36, ], "type": "Punctuator", "value": "}", @@ -52652,436 +51793,122 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "TSInterfaceDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 20, - 31, - ], - "type": "Identifier", - }, - "kind": "constructor", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 15, + "line": 1, }, }, - "range": Array [ - 20, - 113, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 85, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - }, - "range": Array [ - 81, - 91, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "operator": "=", - "range": Array [ - 81, - 106, - ], - "right": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "name": "config", - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - }, - "range": Array [ - 94, - 106, - ], - "type": "MemberExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 107, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 71, - 113, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "name": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { "column": 15, - "line": 2, + "line": 1, }, }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "APP_CONFIG", - "range": Array [ - 40, - 50, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "Inject", - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 51, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 51, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "name": "config", - "range": Array [ - 52, - 69, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 58, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 60, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "name": "AppConfig", - "range": Array [ - 60, - 69, - ], - "type": "Identifier", - }, - }, - }, - }, - ], + "name": "T", "range": Array [ - 31, - 113, + 15, + 16, ], - "type": "FunctionExpression", + "type": "Identifier", }, + "range": Array [ + 15, + 16, + ], + "type": "TSTypeParameter", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, "range": Array [ 14, - 115, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Service", - "range": Array [ - 6, - 13, + 17, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 115, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -53090,14 +51917,14 @@ Object { }, "range": Array [ 0, - 116, + 22, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -53107,28 +51934,28 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 13, + 10, + 14, ], "type": "Identifier", - "value": "Service", + "value": "Test", }, Object { "loc": Object { @@ -53146,400 +51973,396 @@ Object { 15, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 31, - ], - "type": "Identifier", - "value": "constructor", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 2, + "line": 1, }, "start": Object { "column": 15, - "line": 2, + "line": 1, }, }, "range": Array [ - 31, - 32, + 15, + 16, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 2, + "line": 1, }, "start": Object { "column": 16, - "line": 2, + "line": 1, }, }, "range": Array [ - 32, - 33, + 16, + 17, ], "type": "Punctuator", - "value": "@", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 33, - 39, + 18, + 19, ], - "type": "Identifier", - "value": "Inject", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 1, "line": 2, }, "start": Object { - "column": 23, + "column": 0, "line": 2, }, }, "range": Array [ - 39, - 40, + 20, + 21, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 50, - ], - "type": "Identifier", - "value": "APP_CONFIG", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 76, + 79, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "name": "bar", + "range": Array [ + 80, + 83, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 76, + 85, + ], + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, + "range": Array [ + 15, + 87, + ], + "type": "TSInterfaceBody", }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "Test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", }, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "value": "config", - }, - Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 1, + "line": 7, }, "start": Object { - "column": 42, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 58, - 59, + 0, + 87, ], - "type": "Punctuator", - "value": ":", + "type": "TSInterfaceDeclaration", }, + ], + "comments": Array [ Object { "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 7, + "line": 5, }, "start": Object { - "column": 44, + "column": 4, "line": 2, }, }, "range": Array [ - 60, - 69, + 21, + 71, ], - "type": "Identifier", - "value": "AppConfig", + "type": "Block", + "value": "* + * Comment Line 1 + * @baz bar + ", }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "{", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 88, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 9, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 81, - 85, + 0, + 9, ], "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ".", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 86, - 91, + 10, + 14, ], "type": "Identifier", - "value": "title", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 92, - 93, + 15, + 16, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 7, + "line": 6, }, "start": Object { - "column": 21, - "line": 3, + "column": 4, + "line": 6, }, }, "range": Array [ - 94, - 100, + 76, + 79, ], "type": "Identifier", - "value": "config", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 6, }, "start": Object { - "column": 27, - "line": 3, + "column": 7, + "line": 6, }, }, "range": Array [ - 100, - 101, + 79, + 80, ], "type": "Punctuator", - "value": ".", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 3, + "column": 11, + "line": 6, }, "start": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 6, }, }, "range": Array [ - 101, - 106, + 80, + 83, ], "type": "Identifier", - "value": "title", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 3, + "column": 12, + "line": 6, }, "start": Object { - "column": 33, - "line": 3, + "column": 11, + "line": 6, }, }, "range": Array [ - 106, - 107, + 83, + 84, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 13, + "line": 6, }, "start": Object { - "column": 4, - "line": 4, + "column": 12, + "line": 6, }, }, "range": Array [ - 112, - 113, + 84, + 85, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 7, }, "start": Object { "column": 0, - "line": 5, + "line": 7, }, }, "range": Array [ - 114, - 115, + 86, + 87, ], "type": "Punctuator", "value": "}", @@ -53549,7 +52372,7 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-method.src 1`] = ` Object { "body": Array [ Object { @@ -53560,246 +52383,378 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "name": "bar", + "name": "h", "range": Array [ - 16, 19, + 20, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 38, + "column": 23, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "range": Array [ - 16, - 50, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 38, + "column": 15, "line": 2, }, "start": Object { - "column": 36, + "column": 4, "line": 2, }, }, + "name": "bar", "range": Array [ - 48, - 50, + 21, + 32, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "special", - "range": Array [ - 21, - 28, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 34, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 34, - ], - "type": "Decorator", - }, - ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 34, + "column": 15, "line": 2, }, "start": Object { - "column": 23, + "column": 7, "line": 2, }, }, - "name": "baz", "range": Array [ - 35, - 46, + 24, + 32, ], - "type": "Identifier", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 34, + "column": 15, "line": 2, }, "start": Object { - "column": 26, + "column": 9, "line": 2, }, }, "range": Array [ - 38, - 46, + 26, + 32, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSNumberKeyword", + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 19, + 40, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 33, + 39, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 35, + 39, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "g", + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 48, + 54, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 51, + 54, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 43, + 59, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 55, + 58, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, }, }, + "name": "T", + "range": Array [ + 57, + 58, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSMethodSignature", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + }, + "range": Array [ + 45, + 46, + ], + "type": "TSTypeParameter", }, ], "range": Array [ - 19, - 50, + 44, + 47, ], - "type": "FunctionExpression", + "type": "TSTypeParameterDeclaration", }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 52, + 15, + 61, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "Foo", + "name": "test", "range": Array [ - 6, - 9, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -53808,17 +52763,16 @@ Object { }, "range": Array [ 0, - 52, + 61, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -53827,14 +52781,14 @@ Object { }, "range": Array [ 0, - 53, + 62, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -53844,43 +52798,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 9, + 10, + 14, ], "type": "Identifier", - "value": "Foo", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 11, + 15, + 16, ], "type": "Punctuator", "value": "{", @@ -53888,35 +52842,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 16, 19, + 20, ], "type": "Identifier", - "value": "bar", + "value": "h", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 4, "line": 2, }, "start": Object { - "column": 7, + "column": 3, "line": 2, }, }, "range": Array [ - 19, 20, + 21, ], "type": "Punctuator", "value": "(", @@ -53924,83 +52878,83 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { - "column": 8, + "column": 4, "line": 2, }, }, "range": Array [ - 20, 21, + 24, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 2, }, "start": Object { - "column": 9, + "column": 7, "line": 2, }, }, "range": Array [ - 21, - 28, + 24, + 25, ], - "type": "Identifier", - "value": "special", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 2, }, "start": Object { - "column": 16, + "column": 9, "line": 2, }, }, "range": Array [ - 28, - 29, + 26, + 32, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 2, }, "start": Object { - "column": 17, + "column": 15, "line": 2, }, }, "range": Array [ - 29, + 32, 33, ], - "type": "Boolean", - "value": "true", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 17, "line": 2, }, "start": Object { - "column": 21, + "column": 16, "line": 2, }, }, @@ -54009,71 +52963,107 @@ Object { 34, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 2, }, "start": Object { - "column": 23, + "column": 18, "line": 2, }, }, "range": Array [ 35, - 38, + 39, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 2, }, "start": Object { - "column": 26, + "column": 22, "line": 2, }, }, "range": Array [ - 38, 39, + 40, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 3, + "line": 3, }, "start": Object { - "column": 28, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 40, + 43, + 44, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, 46, ], "type": "Identifier", - "value": "number", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 6, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 5, + "line": 3, }, }, "range": Array [ @@ -54081,52 +53071,52 @@ Object { 47, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 36, - "line": 2, + "column": 6, + "line": 3, }, }, "range": Array [ + 47, 48, - 49, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 10, + "line": 3, }, "start": Object { - "column": 37, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 49, - 50, + 48, + 51, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 11, "line": 3, }, "start": Object { - "column": 0, + "column": 10, "line": 3, }, }, @@ -54135,43 +53125,150 @@ Object { 52, ], "type": "Punctuator", - "value": "}", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 45, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, "line": 2, }, "start": Object { @@ -54179,220 +53276,252 @@ Object { "line": 2, }, }, + "optional": true, "range": Array [ - 22, - 63, + 21, + 26, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "TSPropertySignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 31, + 34, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "optional": true, + "range": Array [ + 31, + 44, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 35, + 43, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 43, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 61, - 63, + 37, + 43, ], - "type": "BlockStatement", + "type": "TSStringKeyword", }, - "expression": false, - "generator": false, - "id": null, + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 7, + "line": 4, }, "start": Object { - "column": 14, - "line": 2, + "column": 4, + "line": 4, }, }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 42, - 46, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "special", - "range": Array [ - 34, - 41, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 34, - 47, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 47, - ], - "type": "Decorator", - }, - ], + "name": "baz", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "optional": true, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "foo", + "range": Array [ + 54, + 57, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 59, + 71, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 26, + "line": 4, }, "start": Object { - "column": 30, - "line": 2, + "column": 18, + "line": 4, }, }, - "name": "baz", "range": Array [ - 48, - 59, + 63, + 71, ], - "type": "Identifier", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 26, + "line": 4, }, "start": Object { - "column": 33, - "line": 2, + "column": 20, + "line": 4, }, }, "range": Array [ - 51, - 59, + 65, + 71, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "TSNumberKeyword", - }, + "type": "TSStringKeyword", }, }, - ], - "range": Array [ - 32, - 63, - ], - "type": "FunctionExpression", - }, + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "name": "baz", + "optional": true, + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 49, + 79, + ], + "type": "TSMethodSignature", }, ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { - "column": 16, + "column": 15, "line": 1, }, }, "range": Array [ - 16, - 65, + 15, + 81, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "StaticFoo", + "name": "test", "range": Array [ - 6, - 15, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -54401,17 +53530,16 @@ Object { }, "range": Array [ 0, - 65, + 81, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -54420,14 +53548,14 @@ Object { }, "range": Array [ 0, - 66, + 82, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -54437,43 +53565,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 15, + 10, + 14, ], "type": "Identifier", - "value": "StaticFoo", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 16, + "column": 15, "line": 1, }, }, "range": Array [ + 15, 16, - 17, ], "type": "Punctuator", "value": "{", @@ -54481,7 +53609,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 2, }, "start": Object { @@ -54490,152 +53618,152 @@ Object { }, }, "range": Array [ - 22, - 28, + 21, + 24, ], - "type": "Keyword", - "value": "static", - }, + "type": "Identifier", + "value": "foo", + }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 2, }, "start": Object { - "column": 11, + "column": 7, "line": 2, }, }, "range": Array [ - 29, - 32, + 24, + 25, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 2, }, "start": Object { - "column": 14, + "column": 8, "line": 2, }, }, "range": Array [ - 32, - 33, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 33, + 31, 34, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ 34, - 41, + 35, ], - "type": "Identifier", - "value": "special", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 23, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 41, - 42, + 35, + 36, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 24, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 42, - 46, + 37, + 43, ], - "type": "Boolean", - "value": "true", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 17, + "line": 3, }, "start": Object { - "column": 28, - "line": 2, + "column": 16, + "line": 3, }, }, "range": Array [ - 46, - 47, + 43, + 44, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 7, + "line": 4, }, "start": Object { - "column": 30, - "line": 2, + "column": 4, + "line": 4, }, }, "range": Array [ - 48, - 51, + 49, + 52, ], "type": "Identifier", "value": "baz", @@ -54643,84 +53771,102 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 8, + "line": 4, }, "start": Object { - "column": 33, - "line": 2, + "column": 7, + "line": 4, }, }, "range": Array [ - 51, 52, + 53, ], "type": "Punctuator", - "value": ":", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 9, + "line": 4, }, "start": Object { - "column": 35, - "line": 2, + "column": 8, + "line": 4, }, }, "range": Array [ 53, - 59, + 54, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 54, + 57, ], "type": "Identifier", - "value": "number", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 13, + "line": 4, }, "start": Object { - "column": 41, - "line": 2, + "column": 12, + "line": 4, }, }, "range": Array [ - 59, - 60, + 57, + 58, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 2, + "column": 17, + "line": 4, }, "start": Object { - "column": 43, - "line": 2, + "column": 14, + "line": 4, }, }, "range": Array [ - 61, + 59, 62, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 18, + "line": 4, }, "start": Object { - "column": 44, - "line": 2, + "column": 17, + "line": 4, }, }, "range": Array [ @@ -54728,22 +53874,148 @@ Object { 63, ], "type": "Punctuator", - "value": "}", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 18, + "line": 4, }, }, "range": Array [ + 63, 64, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ 65, + 71, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 31, + "line": 4, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 4, + }, + "start": Object { + "column": 33, + "line": 4, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 80, + 81, ], "type": "Punctuator", "value": "}", @@ -54753,7 +54025,7 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` Object { "body": Array [ Object { @@ -54764,7 +54036,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { @@ -54772,18 +54044,17 @@ Object { "line": 2, }, }, - "name": "greet", + "name": "foo", "range": Array [ - 20, - 25, + 21, + 24, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 8, + "line": 2, }, "start": Object { "column": 4, @@ -54791,291 +54062,50 @@ Object { }, }, "range": Array [ - 20, - 95, + 21, + 25, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 67, - 75, - ], - "raw": "\\"Hello \\"", - "type": "Literal", - "value": "Hello ", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 67, - 82, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "name", - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 67, - 88, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 85, - 88, - ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 60, - 89, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 50, - 95, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "required", - "range": Array [ - 27, - 35, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 35, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "name", - "range": Array [ - 36, - 48, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 25, - 95, - ], - "type": "FunctionExpression", - }, + "type": "TSPropertySignature", }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 97, + 15, + 27, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "Greeter", + "name": "test", "range": Array [ - 6, - 13, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, @@ -55084,17 +54114,16 @@ Object { }, "range": Array [ 0, - 97, + 27, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -55103,14 +54132,14 @@ Object { }, "range": Array [ 0, - 98, + 28, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -55120,43 +54149,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 13, + 10, + 14, ], "type": "Identifier", - "value": "Greeter", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], "type": "Punctuator", "value": "{", @@ -55164,7 +54193,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { @@ -55173,39 +54202,39 @@ Object { }, }, "range": Array [ - 20, - 25, + 21, + 24, ], "type": "Identifier", - "value": "greet", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 2, }, "start": Object { - "column": 9, + "column": 7, "line": 2, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ @@ -55213,606 +54242,478 @@ Object { 27, ], "type": "Punctuator", - "value": "@", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "range": Array [ - 27, - 35, - ], - "type": "Identifier", - "value": "required", - }, - Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 40, + 0, + 19, ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 24, - "line": 2, + "operator": "keyof", + "range": Array [ + 9, + 18, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, }, }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 48, + 0, + 4, ], "type": "Identifier", - "value": "string", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 48, - 49, + 5, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 34, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 50, - 51, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 3, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 60, - 66, + 9, + 14, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "keyof", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { "column": 15, - "line": 3, - }, - }, - "range": Array [ - 67, - 75, - ], - "type": "String", - "value": "\\"Hello \\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, + "line": 1, }, }, "range": Array [ - 78, - 82, + 15, + 18, ], "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "String", - "value": "\\"!\\"", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 36, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 88, - 89, + 18, + 19, ], "type": "Punctuator", "value": ";", }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "}", - }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/nested-type-arguments.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "greet", - "range": Array [ - 33, - 38, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 44, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, + "name": "nestedArray", "range": Array [ - 26, - 108, + 4, + 44, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 80, - 88, - ], - "raw": "\\"Hello \\"", - "type": "Literal", - "value": "Hello ", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 80, - 95, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "name", - "range": Array [ - 91, - 95, - ], - "type": "Identifier", - }, - "type": "BinaryExpression", - }, + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 44, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 44, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 17, + 22, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 43, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 23, + "line": 1, }, }, - "operator": "+", "range": Array [ - 80, - 101, + 23, + 43, ], - "right": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 33, - "line": 3, + "column": 23, + "line": 1, }, }, + "name": "Array", "range": Array [ - 98, - 101, + 23, + 28, ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, + "type": "Identifier", }, - }, - "range": Array [ - 73, - 102, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 108, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, }, - "name": "required", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 42, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 29, + 34, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + ], + "range": Array [ + 34, + 42, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + ], "range": Array [ - 40, - 48, + 28, + 43, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, + "type": "TSTypeParameterInstantiation", }, - "range": Array [ - 39, - 48, - ], - "type": "Decorator", }, ], - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "name", "range": Array [ - 49, - 61, + 22, + 44, ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", - }, - }, + "type": "TSTypeParameterInstantiation", }, - ], - "range": Array [ - 38, - 108, - ], - "type": "FunctionExpression", + }, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 110, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 44, + ], + "type": "VariableDeclarator", }, - "name": "StaticGreeter", - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -55821,17 +54722,16 @@ Object { }, "range": Array [ 0, - 110, + 44, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -55840,14 +54740,14 @@ Object { }, "range": Array [ 0, - 111, + 44, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -55857,443 +54757,866 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 19, + 4, + 15, ], "type": "Identifier", - "value": "StaticGreeter", + "value": "nestedArray", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 20, + "column": 15, "line": 1, }, }, "range": Array [ - 20, - 21, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 32, + 17, + 22, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 33, - 38, + 22, + 23, ], - "type": "Identifier", - "value": "greet", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, - }, + "column": 23, + "line": 1, + }, }, "range": Array [ - 38, - 39, + 23, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 39, - 40, + 28, + 29, ], "type": "Punctuator", - "value": "@", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 40, - 48, + 29, + 34, ], "type": "Identifier", - "value": "required", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 49, - 53, + 34, + 35, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 31, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 53, - 54, + 35, + 41, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 55, - 61, + 41, + 42, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 39, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 61, - 62, + 42, + 43, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 43, + "line": 1, }, }, "range": Array [ - 63, - 64, + 43, + 44, ], "type": "Punctuator", - "value": "{", + "value": ">", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/never-type-param.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 17, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSNeverKeyword", + }, + ], + "range": Array [ + 10, + 17, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 17, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 73, - 79, + 0, + 18, ], - "type": "Keyword", - "value": "return", + "type": "VariableDeclaration", }, Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "Observable", + "range": Array [ + 19, + 29, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "empty", + "range": Array [ + 30, + 35, + ], + "type": "Identifier", + }, + "range": Array [ + 19, + 35, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 19, + 44, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 36, + 41, + ], + "type": "TSNeverKeyword", + }, + ], + "range": Array [ + 35, + 42, + ], + "type": "TSTypeParameterInstantiation", + }, + }, "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { - "column": 15, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 80, - 88, + 19, + 45, ], - "type": "String", - "value": "\\"Hello \\"", + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 46, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 24, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 89, - 90, + 0, + 5, ], - "type": "Punctuator", - "value": "+", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 6, + "line": 1, }, }, "range": Array [ - 91, - 95, + 6, + 7, ], "type": "Identifier", - "value": "name", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 31, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 96, - 97, + 7, + 8, ], "type": "Punctuator", - "value": "+", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 33, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 98, - 101, + 9, + 10, ], - "type": "String", - "value": "\\"!\\"", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 36, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 101, - 102, + 10, + 11, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 11, + "line": 1, }, }, "range": Array [ - 107, - 108, + 11, + 16, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "never", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 109, - 110, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": ">", }, - ], - "type": "Program", + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 19, + 29, + ], + "type": "Identifier", + "value": "Observable", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "Identifier", + "value": "empty", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 36, + 41, + ], + "type": "Identifier", + "value": "never", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/non-null-assertion-operator.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Input", - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - }, + "expression": Object { + "arguments": Array [ + Object { "loc": Object { "end": Object { - "column": 12, + "column": 20, "line": 2, }, "start": Object { - "column": 5, + "column": 19, "line": 2, }, }, + "name": "e", "range": Array [ - 27, - 34, + 56, + 57, ], - "type": "CallExpression", + "type": "Identifier", }, + ], + "callee": Object { "loc": Object { "end": Object { - "column": 12, + "column": 18, "line": 2, }, "start": Object { @@ -56301,34 +55624,32 @@ Object { "line": 2, }, }, + "name": "validateEntity", "range": Array [ - 26, - 34, + 41, + 55, ], - "type": "Decorator", + "type": "Identifier", }, - ], - "key": Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 2, }, "start": Object { - "column": 13, + "column": 4, "line": 2, }, }, - "name": "data", "range": Array [ - 35, - 39, + 41, + 58, ], - "type": "Identifier", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 2, }, "start": Object { @@ -56337,92 +55658,125 @@ Object { }, }, "range": Array [ - 26, - 40, + 41, + 59, ], - "static": false, - "type": "ClassProperty", - "value": null, + "type": "ExpressionStatement", }, Object { - "computed": false, - "decorators": Array [ + "declarations": Array [ Object { - "expression": Object { - "arguments": Array [], - "callee": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "s", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "init": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "object": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "e", + "range": Array [ + 72, + 73, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 3, }, "start": Object { - "column": 5, + "column": 12, "line": 3, }, }, - "name": "Output", "range": Array [ - 46, - 52, + 72, + 74, ], - "type": "Identifier", + "type": "TSNonNullExpression", }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, + "property": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, }, + "name": "name", + "range": Array [ + 75, + 79, + ], + "type": "Identifier", }, "range": Array [ - 46, - 54, + 72, + 79, ], - "type": "CallExpression", + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 13, + "column": 19, "line": 3, }, "start": Object { - "column": 4, + "column": 8, "line": 3, }, }, "range": Array [ - 45, - 54, + 68, + 79, ], - "type": "Decorator", + "type": "VariableDeclarator", }, ], - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "click", - "range": Array [ - 59, - 64, - ], - "type": "Identifier", - }, + "kind": "let", "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 20, + "line": 3, }, "start": Object { "column": 4, @@ -56430,384 +55784,457 @@ Object { }, }, "range": Array [ - 45, - 86, + 64, + 80, ], - "static": false, - "type": "ClassProperty", - "value": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "EventEmitter", - "range": Array [ - 71, - 83, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 67, - 85, - ], - "type": "NewExpression", - }, + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { - "column": 20, + "column": 35, "line": 1, }, }, "range": Array [ - 20, - 88, + 35, + 82, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "SomeComponent", + "name": "processEntity", "range": Array [ - 6, - 19, + 9, + 22, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - "value": "SomeComponent", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "e", + "optional": true, + "range": Array [ + 23, + 33, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 33, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "Entity", + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 0, + 82, + ], + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 22, "line": 1, }, "start": Object { - "column": 20, + "column": 9, "line": 1, }, }, "range": Array [ - 20, - 21, + 9, + 22, + ], + "type": "Identifier", + "value": "processEntity", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "e", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, }, }, "range": Array [ + 25, 26, - 27, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ 27, - 32, + 33, ], "type": "Identifier", - "value": "Input", + "value": "Entity", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 32, 33, + 34, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 33, - 34, + 35, + 36, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 2, }, "start": Object { - "column": 13, + "column": 4, "line": 2, }, }, "range": Array [ - 35, - 39, + 41, + 55, ], "type": "Identifier", - "value": "data", + "value": "validateEntity", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 2, }, "start": Object { - "column": 17, + "column": 18, "line": 2, }, }, "range": Array [ - 39, - 40, + 55, + 56, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 19, + "line": 2, }, }, "range": Array [ - 45, - 46, + 56, + 57, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 21, + "line": 2, }, "start": Object { - "column": 5, - "line": 3, + "column": 20, + "line": 2, }, }, "range": Array [ - 46, - 52, + 57, + 58, ], - "type": "Identifier", - "value": "Output", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 22, + "line": 2, }, "start": Object { - "column": 11, - "line": 3, + "column": 21, + "line": 2, }, }, "range": Array [ - 52, - 53, + 58, + 59, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 3, }, "start": Object { - "column": 12, + "column": 4, "line": 3, }, }, "range": Array [ - 53, - 54, + 64, + 67, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 4, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 8, + "line": 3, }, }, "range": Array [ - 59, - 64, + 68, + 69, ], "type": "Identifier", - "value": "click", + "value": "s", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 4, + "line": 3, }, "start": Object { "column": 10, - "line": 4, + "line": 3, }, }, "range": Array [ - 65, - 66, + 70, + 71, ], "type": "Punctuator", "value": "=", @@ -56815,89 +56242,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 4, + "column": 13, + "line": 3, }, "start": Object { "column": 12, - "line": 4, + "line": 3, }, }, "range": Array [ - 67, - 70, + 72, + 73, ], - "type": "Keyword", - "value": "new", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 4, + "column": 14, + "line": 3, }, "start": Object { - "column": 16, - "line": 4, + "column": 13, + "line": 3, }, }, "range": Array [ - 71, - 83, + 73, + 74, ], - "type": "Identifier", - "value": "EventEmitter", + "type": "Punctuator", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 4, + "column": 15, + "line": 3, }, "start": Object { - "column": 28, - "line": 4, + "column": 14, + "line": 3, }, }, "range": Array [ - 83, - 84, + 74, + 75, ], "type": "Punctuator", - "value": "(", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 4, + "column": 19, + "line": 3, }, "start": Object { - "column": 29, - "line": 4, + "column": 15, + "line": 3, }, }, "range": Array [ - 84, - 85, + 75, + 79, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 20, + "line": 3, }, "start": Object { - "column": 30, - "line": 4, + "column": 19, + "line": 3, }, }, "range": Array [ - 85, - 86, + 79, + 80, ], "type": "Punctuator", "value": ";", @@ -56906,16 +56333,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 87, - 88, + 81, + 82, ], "type": "Punctuator", "value": "}", @@ -56925,110 +56352,106 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = ` +exports[`typescript fixtures/basics/null-and-undefined-type-annotations.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 32, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "configurable", - "range": Array [ - 15, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 33, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 33, - ], - "type": "Decorator", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, + }, + "name": "x", + "range": Array [ + 4, + 11, ], - "key": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 36, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 31, - "line": 2, + "column": 5, + "line": 1, }, }, - "name": "prop1", "range": Array [ - 41, - 46, + 5, + 11, ], - "type": "Identifier", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 11, + ], + "type": "TSNullKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, + }, + "range": Array [ + 4, + 11, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 37, + "column": 16, "line": 2, }, "start": Object { @@ -57036,185 +56459,88 @@ Object { "line": 2, }, }, + "name": "y", "range": Array [ - 14, - 47, - ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 67, - 72, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "configurable", - "range": Array [ - 54, - 66, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 54, - 73, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 73, - ], - "type": "Decorator", - }, + 17, + 29, ], - "key": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 16, - "line": 5, + "line": 2, }, "start": Object { - "column": 11, - "line": 5, + "column": 5, + "line": 2, }, }, - "name": "prop2", "range": Array [ - 85, - 90, + 18, + 29, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 4, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 29, + ], + "type": "TSUndefinedKeyword", }, }, - "range": Array [ - 53, - 91, - ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 93, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, }, - "start": Object { - "column": 6, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 17, + 29, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 17, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 93, + 13, + 30, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 17, + "line": 2, }, "start": Object { "column": 0, @@ -57223,14 +56549,14 @@ Object { }, "range": Array [ 0, - 93, + 30, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -57240,528 +56566,561 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "line": 1, }, }, "range": Array [ - 14, - 15, + 5, + 6, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 15, - 27, + 7, + 11, ], - "type": "Identifier", - "value": "configurable", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 27, - 28, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 3, "line": 2, }, "start": Object { - "column": 18, + "column": 0, "line": 2, }, }, "range": Array [ - 28, - 32, + 13, + 16, ], - "type": "Boolean", - "value": "true", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 5, "line": 2, }, "start": Object { - "column": 22, + "column": 4, "line": 2, }, }, "range": Array [ - 32, - 33, + 17, + 18, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 6, "line": 2, }, "start": Object { - "column": 24, + "column": 5, "line": 2, }, }, "range": Array [ - 34, - 40, + 18, + 19, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 16, "line": 2, }, "start": Object { - "column": 31, + "column": 7, "line": 2, }, }, "range": Array [ - 41, - 46, + 20, + 29, ], "type": "Identifier", - "value": "prop1", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 17, "line": 2, }, "start": Object { - "column": 36, + "column": 16, "line": 2, }, }, "range": Array [ - 46, - 47, + 29, + 30, ], "type": "Punctuator", "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, + "expression": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 7, + ], + "raw": "'__'", + "type": "Literal", + "value": "__", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 13, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 13, + ], + "raw": "null", + "type": "Literal", + "value": null, + }, + }, + ], + "range": Array [ + 1, + 15, + ], + "type": "ObjectExpression", }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "@", - }, - Object { "loc": Object { "end": Object { "column": 17, - "line": 4, + "line": 1, }, "start": Object { - "column": 5, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 54, - 66, + 0, + 17, ], - "type": "Identifier", - "value": "configurable", + "type": "ExpressionStatement", }, Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 67, - 72, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 22, + 26, + ], + "raw": "'__'", + "type": "Literal", + "value": "__", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "method": true, + "range": Array [ + 22, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 26, + 31, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 20, + 33, + ], + "type": "ObjectExpression", }, - "range": Array [ - 78, - 84, - ], - "type": "Keyword", - "value": "static", - }, - Object { "loc": Object { "end": Object { "column": 16, - "line": 5, + "line": 3, }, "start": Object { - "column": 11, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 85, - 90, + 19, + 35, ], - "type": "Identifier", - "value": "prop2", + "type": "ExpressionStatement", }, Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, + "expression": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 41, + 45, + ], + "raw": "'__'", + "type": "Literal", + "value": "__", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "method": false, + "range": Array [ + 40, + 52, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 48, + 52, + ], + "raw": "null", + "type": "Literal", + "value": null, + }, + }, + ], + "range": Array [ + 38, + 54, + ], + "type": "ObjectExpression", }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 19, + "line": 5, }, "start": Object { "column": 0, - "line": 6, + "line": 5, }, }, "range": Array [ - 92, - 93, + 37, + 56, ], - "type": "Punctuator", - "value": "}", + "type": "ExpressionStatement", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/property-decorators/property-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ Object { "body": Object { "body": Array [ Object { "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 14, + "line": 7, }, "start": Object { - "column": 9, - "line": 2, + "column": 10, + "line": 7, }, }, - "name": "x", "range": Array [ - 19, - 20, + 68, + 72, ], - "type": "Identifier", + "raw": "'__'", + "type": "Literal", + "value": "__", }, "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 21, + "line": 7, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 7, }, }, "range": Array [ - 14, - 21, + 68, + 79, ], "static": false, "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Decorator", - }, - ], - "key": Object { + "value": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 21, + "line": 7, }, "start": Object { - "column": 4, - "line": 4, + "column": 17, + "line": 7, }, }, - "name": "y", "range": Array [ - 35, - 36, + 75, + 79, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "raw": "null", + "type": "Literal", + "value": null, }, - "range": Array [ - 26, - 37, - ], - "static": false, - "type": "ClassProperty", - "value": null, }, ], "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 23, + "line": 7, }, "start": Object { "column": 8, - "line": 1, + "line": 7, }, }, "range": Array [ - 8, - 39, + 66, + 81, ], "type": "ClassBody", }, @@ -57769,33 +57128,33 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 7, }, "start": Object { "column": 6, - "line": 1, + "line": 7, }, }, - "name": "B", + "name": "X", "range": Array [ - 6, - 7, + 64, + 65, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 23, + "line": 7, }, "start": Object { "column": 0, - "line": 1, + "line": 7, }, }, "range": Array [ - 0, - 39, + 58, + 81, ], "superClass": null, "type": "ClassDeclaration", @@ -57804,8 +57163,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 0, + "line": 8, }, "start": Object { "column": 0, @@ -57814,14 +57173,14 @@ Object { }, "range": Array [ 0, - 39, + 82, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -57831,993 +57190,511 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], - "type": "Identifier", - "value": "B", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 9, + 3, + 7, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 14, - 15, + 7, + 8, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 15, - 18, + 9, + 13, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 19, - 20, + 14, + 15, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 20, - 21, + 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 26, - 27, + 16, + 17, ], "type": "Punctuator", - "value": "@", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 3, }, "start": Object { - "column": 5, + "column": 0, "line": 3, }, }, "range": Array [ - 27, - 30, + 19, + 20, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 2, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 1, + "line": 3, }, }, "range": Array [ - 35, - 36, + 20, + 21, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 4, + "column": 7, + "line": 3, }, "start": Object { - "column": 5, - "line": 4, + "column": 3, + "line": 3, }, }, "range": Array [ - 36, - 37, + 22, + 26, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 8, + "line": 3, }, "start": Object { - "column": 0, - "line": 5, + "column": 7, + "line": 3, }, }, "range": Array [ - 38, - 39, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/property-decorators/property-decorator-static-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 28, - ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "qux", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "b", - "range": Array [ - 49, - 50, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 33, - 51, - ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 53, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 9, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 0, - 53, + 27, + 28, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 54, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 0, - 5, + 29, + 30, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 6, - 7, + 30, + 31, ], - "type": "Identifier", - "value": "C", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 8, - 9, + 32, + 33, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 14, - 15, + 33, + 34, ], "type": "Punctuator", - "value": "@", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 3, }, }, "range": Array [ - 15, - 18, + 34, + 35, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 9, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 19, - 25, + 37, + 38, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 2, + "line": 5, }, "start": Object { - "column": 16, - "line": 2, + "column": 1, + "line": 5, }, }, "range": Array [ - 26, - 27, + 38, + 39, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 4, + "line": 5, }, "start": Object { - "column": 17, - "line": 2, + "column": 3, + "line": 5, }, }, "range": Array [ - 27, - 28, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 8, + "line": 5, }, "start": Object { "column": 4, - "line": 3, + "line": 5, }, }, "range": Array [ - 33, - 34, + 41, + 45, ], - "type": "Punctuator", - "value": "@", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 9, + "line": 5, }, "start": Object { - "column": 5, - "line": 3, + "column": 8, + "line": 5, }, }, "range": Array [ - 34, - 37, + 45, + 46, ], - "type": "Identifier", - "value": "qux", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 4, + "line": 5, }, "start": Object { - "column": 4, - "line": 4, + "column": 9, + "line": 5, }, }, "range": Array [ - 42, - 48, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 49, - 50, + 46, + 47, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 15, + "line": 5, }, "start": Object { - "column": 12, - "line": 4, + "column": 11, + "line": 5, }, }, "range": Array [ - 50, - 51, + 48, + 52, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 17, "line": 5, }, "start": Object { - "column": 0, + "column": 16, "line": 5, }, }, "range": Array [ - 52, 53, + 54, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/class-empty-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "line": 5, }, }, "range": Array [ - 10, - 17, + 54, + 55, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 1, + "line": 5, }, "start": Object { "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 21, - 22, + 55, + 56, ], "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/class-empty-extends-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "TSClassImplements", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "value": ";", }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 7, }, "start": Object { "column": 0, - "line": 1, + "line": 7, }, }, "range": Array [ - 0, - 5, + 58, + 63, ], "type": "Keyword", "value": "class", @@ -58825,107 +57702,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { "column": 6, - "line": 1, + "line": 7, }, }, "range": Array [ - 6, - 9, + 64, + 65, ], "type": "Identifier", - "value": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 9, + "line": 7, }, "start": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 10, - 17, + 66, + 67, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 14, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 10, + "line": 7, }, }, "range": Array [ - 18, - 28, + 68, + 72, ], - "type": "Keyword", - "value": "implements", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 16, + "line": 7, }, "start": Object { - "column": 29, - "line": 1, + "column": 15, + "line": 7, }, }, "range": Array [ - 29, - 32, + 73, + 74, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 21, + "line": 7, }, "start": Object { - "column": 33, - "line": 1, + "column": 17, + "line": 7, }, }, "range": Array [ - 33, - 34, + 75, + 79, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 7, }, "start": Object { - "column": 0, - "line": 3, + "column": 22, + "line": 7, }, }, "range": Array [ - 36, - 37, + 80, + 81, ], "type": "Punctuator", "value": "}", @@ -58935,832 +57812,796 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/class-extends-empty-implements.src 1`] = ` +exports[`typescript fixtures/basics/object-with-typed-methods.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - }, - "name": "Bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "type": "ClassDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 17, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 32, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/decorator-on-enum-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { + "init": Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 1, + "line": 13, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, - "name": "dec", - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "Decorator", - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "E", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 0, - 14, - ], - "type": "TSEnumDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - "value": "dec", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "E", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/decorator-on-interface-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "TSInterfaceBody", - }, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 16, + 29, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", }, - "start": Object { - "column": 1, - "line": 1, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, }, - }, - "name": "deco", - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 7, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "M", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "value": "deco", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/empty-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "method": true, + "range": Array [ + 16, + 61, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 56, + 57, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 49, + 57, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 43, + 61, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 32, + 61, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 34, + 42, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "range": Array [ + 30, + 31, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 29, + 32, + ], + "type": "TSTypeParameterDeclaration", + }, }, }, - "range": Array [ - 9, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "foo", + "range": Array [ + 65, + 68, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 3, + "line": 7, }, "start": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 5, }, }, + "method": true, "range": Array [ - 11, - 16, + 65, + 100, ], - "type": "TSTypeReference", - "typeName": Object { + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 95, + 96, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 88, + 96, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "range": Array [ + 82, + 100, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 3, + "line": 7, }, "start": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 5, }, }, - "name": "Foo", + "params": Array [], "range": Array [ - 11, - 14, + 71, + 100, ], - "type": "Identifier", + "returnType": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 5, + }, + }, + "range": Array [ + 73, + 81, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 75, + 81, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "name": "T", + "range": Array [ + 69, + 70, + ], + "type": "Identifier", + }, + "range": Array [ + 69, + 70, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 68, + 71, + ], + "type": "TSTypeParameterDeclaration", + }, }, - "typeParameters": Object { + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 8, }, }, - "params": Array [], + "name": "a", "range": Array [ - 14, - 16, + 108, + 109, ], - "type": "TSTypeParameterInstantiation", + "type": "Identifier", }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", + "kind": "get", + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "method": false, + "range": Array [ + 104, + 138, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "range": Array [ + 133, + 134, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "range": Array [ + 126, + 134, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 18, + "line": 8, + }, + }, + "range": Array [ + 120, + 138, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "params": Array [], + "range": Array [ + 109, + 138, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 111, + 119, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, + }, + }, + "range": Array [ + 113, + 119, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 11, + }, + "start": Object { + "column": 6, + "line": 11, + }, + }, + "name": "a", + "range": Array [ + 146, + 147, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 3, + "line": 12, + }, + "start": Object { + "column": 2, + "line": 11, + }, + }, + "method": false, + "range": Array [ + 142, + 172, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 12, + }, + "start": Object { + "column": 27, + "line": 11, + }, + }, + "range": Array [ + 167, + 172, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 12, + }, + "start": Object { + "column": 7, + "line": 11, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 8, + "line": 11, + }, + }, + "name": "x", + "range": Array [ + 148, + 157, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 9, + "line": 11, + }, + }, + "range": Array [ + 149, + 157, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 11, + }, + }, + "range": Array [ + 151, + 157, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 147, + 172, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 158, + 166, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 20, + "line": 11, + }, + }, + "range": Array [ + 160, + 166, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 12, + 174, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 13, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 174, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 13, }, "start": Object { "column": 0, @@ -59769,7 +58610,7 @@ Object { }, "range": Array [ 0, - 16, + 175, ], "type": "VariableDeclaration", }, @@ -59777,8 +58618,8 @@ Object { "comments": Array [], "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 14, }, "start": Object { "column": 0, @@ -59787,7 +58628,7 @@ Object { }, "range": Array [ 0, - 16, + 176, ], "sourceType": "module", "tokens": Array [ @@ -59830,466 +58671,336 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, - 14, + 12, + 13, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 1, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 14, - 15, + 16, + 29, ], - "type": "Punctuator", - "value": "<", + "type": "String", + "value": "\\"constructor\\"", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 1, + "line": 2, }, "start": Object { "column": 15, - "line": 1, + "line": 2, }, }, "range": Array [ - 15, - 16, + 29, + 30, ], "type": "Punctuator", - "value": ">", + "value": "<", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/enum-with-keywords.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "members": Array [], - "modifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "TSPrivateKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSPublicKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 31, - ], - "type": "TSProtectedKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStaticKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 47, - ], - "type": "TSReadonlyKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 56, - ], - "type": "TSAbstractKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "TSAsyncKeyword", - }, - ], - "range": Array [ - 63, - 72, - ], - "type": "TSEnumDeclaration", - }, "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 0, - 72, + 30, + 31, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "T", }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 0, - 6, + 31, + 32, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 7, - 14, + 32, + 33, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 15, - 21, + 34, + 35, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { "column": 22, - "line": 1, + "line": 2, }, }, "range": Array [ - 22, - 31, + 36, + 42, ], - "type": "Keyword", - "value": "protected", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 32, - 38, + 43, + 44, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 39, - 47, + 49, + 55, ], - "type": "Identifier", - "value": "readonly", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 48, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 48, 56, + 57, ], - "type": "Identifier", - "value": "abstract", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 62, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 57, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 57, + 60, + 61, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 4, + }, + }, + "range": Array [ + 61, 62, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 67, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 63, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 63, - 67, + 65, + 68, ], - "type": "Keyword", - "value": "enum", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 69, - "line": 1, + "column": 6, + "line": 5, }, "start": Object { - "column": 68, - "line": 1, + "column": 5, + "line": 5, }, }, "range": Array [ 68, 69, ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 69, + 70, + ], "type": "Identifier", - "value": "X", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 71, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 70, - "line": 1, + "column": 7, + "line": 5, }, }, "range": Array [ @@ -60297,17 +59008,17 @@ Object { 71, ], "type": "Punctuator", - "value": "{", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 71, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ @@ -60315,2146 +59026,1934 @@ Object { 72, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 10, + "line": 5, }, - "range": Array [ - 22, - 26, - ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "start": Object { + "column": 9, + "line": 5, }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": ")", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 11, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 5, }, }, "range": Array [ - 0, - 26, + 73, + 74, ], - "type": "TSInterfaceDeclaration", + "type": "Punctuator", + "value": ":", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 75, + 81, + ], + "type": "Identifier", + "value": "number", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "range": Array [ + 82, + 83, + ], + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 0, - 9, + 88, + 94, ], "type": "Keyword", - "value": "interface", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 11, + "line": 6, }, }, "range": Array [ - 10, - 13, + 95, + 96, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 99, + 100, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 7, + }, + "start": Object { + "column": 3, + "line": 7, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 104, + 107, ], "type": "Identifier", - "value": "Foo", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 8, }, }, "range": Array [ - 14, - 21, + 108, + 109, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 8, + "line": 8, }, "start": Object { - "column": 22, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 22, - 23, + 109, + 110, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 9, + "line": 8, }, "start": Object { - "column": 0, - "line": 3, + "column": 8, + "line": 8, }, }, "range": Array [ - 25, - 26, + 110, + 111, ], "type": "Punctuator", - "value": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/interface-property-modifiers.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "raw": "'a'", - "type": "Literal", - "value": "a", - }, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 38, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSStringKeyword", - }, - }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 111, + 112, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, + }, + }, + "range": Array [ + 113, + 119, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 18, + "line": 8, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "range": Array [ + 126, + 132, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "range": Array [ + 133, + 134, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 10, + }, + }, + "range": Array [ + 137, + 138, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 10, + }, + "start": Object { + "column": 3, + "line": 10, + }, + }, + "range": Array [ + 138, + 139, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 2, + "line": 11, + }, + }, + "range": Array [ + 142, + 145, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 11, + }, + "start": Object { + "column": 6, + "line": 11, + }, + }, + "range": Array [ + 146, + 147, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 11, + }, + "start": Object { + "column": 7, + "line": 11, + }, + }, + "range": Array [ + 147, + 148, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 11, + }, + "start": Object { + "column": 8, + "line": 11, + }, + }, + "range": Array [ + 148, + 149, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 11, + }, + "start": Object { + "column": 9, + "line": 11, + }, + }, + "range": Array [ + 149, + 150, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 11, + }, + }, + "range": Array [ + 151, + 157, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 11, + }, + "start": Object { + "column": 17, + "line": 11, + }, + }, + "range": Array [ + 157, + 158, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 158, + 159, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 20, + "line": 11, + }, + }, + "range": Array [ + 160, + 166, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 11, + }, + "start": Object { + "column": 27, + "line": 11, + }, + }, + "range": Array [ + 167, + 168, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 12, + }, + "start": Object { + "column": 2, + "line": 12, + }, + }, + "range": Array [ + 171, + 172, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 13, + }, + "start": Object { + "column": 0, + "line": 13, + }, + }, + "range": Array [ + 173, + 174, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 13, + }, + "start": Object { + "column": 1, + "line": 13, + }, + }, + "range": Array [ + 174, + 175, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/parenthesized-use-strict.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, }, - Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 60, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 59, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 1, + "line": 2, }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "name": "b", - "range": Array [ - 73, - 74, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 65, - 83, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 74, - 82, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "TSStringKeyword", - }, - }, + }, + "range": Array [ + 46, + 58, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 45, + 60, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "type": "Line", + "value": " this should not be classed as a directive", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 45, + 60, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 46, + 58, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, }, - Object { - "accessibility": "protected", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "name": "c", - "range": Array [ - 98, - 99, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 42, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "test", + "range": Array [ + 9, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, }, - "range": Array [ - 88, - 108, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 99, - 107, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "TSStringKeyword", - }, + "start": Object { + "column": 14, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "name": "d", - "range": Array [ - 120, - 121, - ], - "type": "Identifier", - }, + "name": "abc", + "range": Array [ + 14, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 6, + "column": 38, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 17, + "line": 1, }, }, "range": Array [ - 113, - 130, + 17, + 38, ], - "static": true, - "type": "TSPropertySignature", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 38, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 19, + "line": 1, }, }, "range": Array [ - 121, - 129, + 19, + 38, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 22, + "line": 1, }, "start": Object { - "column": 14, - "line": 6, + "column": 19, + "line": 1, }, }, + "name": "Map", "range": Array [ - 123, - 129, + 19, + 22, ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "export": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "name": "e", - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 135, - 152, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, + "type": "Identifier", }, - "range": Array [ - 143, - 151, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 20, - "line": 7, + "column": 38, + "line": 1, }, "start": Object { - "column": 14, - "line": 7, + "column": 22, + "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSSymbolKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + ], "range": Array [ - 145, - 151, + 22, + 38, ], - "type": "TSStringKeyword", + "type": "TSTypeParameterInstantiation", }, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "name": "f", - "range": Array [ - 166, - 167, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 157, - 176, - ], - "readonly": true, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 167, - 175, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 169, - 175, - ], - "type": "TSStringKeyword", - }, - }, + }, + ], + "range": Array [ + 0, + 42, + ], + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 13, + ], + "type": "Identifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "abc", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "Map", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "symbol", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, }, + }, + "range": Array [ + 17, + 37, + ], + "type": "TSUnionType", + "types": Array [ Object { - "accessibility": "public", "loc": Object { "end": Object { - "column": 33, - "line": 10, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 17, + "line": 1, }, }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, + "range": Array [ + 17, + 27, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "name": "baz", - "range": Array [ - 190, - 201, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 17, + 24, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 23, - "line": 10, + "column": 26, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 25, + "line": 1, }, }, "range": Array [ - 193, - 201, + 25, + 26, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 23, - "line": 10, + "column": 26, + "line": 1, }, "start": Object { - "column": 17, - "line": 10, + "column": 25, + "line": 1, }, }, + "name": "T", "range": Array [ - 195, - 201, + 25, + 26, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - ], + "start": Object { + "column": 30, + "line": 1, + }, + }, "range": Array [ - 182, - 211, + 30, + 37, ], - "type": "TSIndexSignature", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 32, - "line": 10, + "column": 37, + "line": 1, }, "start": Object { - "column": 24, - "line": 10, + "column": 30, + "line": 1, }, }, + "name": "Failure", "range": Array [ - 202, - 210, + 30, + 37, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 10, - }, - "start": Object { - "column": 26, - "line": 10, - }, - }, - "range": Array [ - 204, - 210, - ], - "type": "TSStringKeyword", - }, + "type": "Identifier", }, }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ Object { - "accessibility": "private", "loc": Object { "end": Object { - "column": 34, - "line": 11, - }, + "column": 13, + "line": 1, + }, "start": Object { - "column": 4, - "line": 11, + "column": 12, + "line": 1, }, }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 11, - }, - }, - "name": "baz", - "range": Array [ - 225, - 236, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 16, - "line": 11, - }, - }, - "range": Array [ - 228, - 236, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 216, - 246, - ], - "type": "TSIndexSignature", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 33, - "line": 11, + "column": 13, + "line": 1, }, "start": Object { - "column": 25, - "line": 11, + "column": 12, + "line": 1, }, }, + "name": "T", "range": Array [ - 237, - 245, + 12, + 13, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 11, - }, - "start": Object { - "column": 27, - "line": 11, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "TSStringKeyword", - }, + "type": "Identifier", }, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + "value": "Result", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 24, + ], + "type": "Identifier", + "value": "Success", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "Identifier", + "value": "Failure", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, }, + }, + "range": Array [ + 28, + 48, + ], + "type": "TSUnionType", + "types": Array [ Object { - "accessibility": "protected", "loc": Object { "end": Object { - "column": 36, - "line": 12, + "column": 38, + "line": 1, }, "start": Object { - "column": 4, - "line": 12, + "column": 28, + "line": 1, }, }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, + "range": Array [ + 28, + 38, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "name": "baz", - "range": Array [ - 262, - 273, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 28, + 35, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 26, - "line": 12, + "column": 37, + "line": 1, }, "start": Object { - "column": 18, - "line": 12, + "column": 36, + "line": 1, }, }, "range": Array [ - 265, - 273, + 36, + 37, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 26, - "line": 12, + "column": 37, + "line": 1, }, "start": Object { - "column": 20, - "line": 12, + "column": 36, + "line": 1, }, }, + "name": "T", "range": Array [ - 267, - 273, + 36, + 37, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, + ], + "range": Array [ + 35, + 38, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, }, - ], + "start": Object { + "column": 41, + "line": 1, + }, + }, "range": Array [ - 251, - 283, + 41, + 48, ], - "type": "TSIndexSignature", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 35, - "line": 12, - }, - "start": Object { - "column": 27, - "line": 12, - }, - }, - "range": Array [ - 274, - 282, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 12, - }, - "start": Object { - "column": 29, - "line": 12, - }, - }, - "range": Array [ - 276, - 282, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "name": "baz", - "range": Array [ - 296, - 307, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "range": Array [ - 299, - 307, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 17, - "line": 13, - }, - }, - "range": Array [ - 301, - 307, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 288, - 317, - ], - "static": true, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 13, + "column": 48, + "line": 1, }, "start": Object { - "column": 24, - "line": 13, + "column": 41, + "line": 1, }, }, + "name": "Failure", "range": Array [ - 308, - 316, + 41, + 48, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 13, - }, - "start": Object { - "column": 26, - "line": 13, - }, - }, - "range": Array [ - 310, - 316, - ], - "type": "TSStringKeyword", - }, + "type": "Identifier", }, }, - Object { - "export": true, - "loc": Object { - "end": Object { - "column": 33, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 12, - "line": 14, - }, - }, - "name": "baz", - "range": Array [ - 330, - 341, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 333, - 341, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 335, - 341, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 322, - 351, - ], - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 14, - }, - "start": Object { - "column": 24, - "line": 14, - }, - }, - "range": Array [ - 342, - 350, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 14, - }, - "start": Object { - "column": 26, - "line": 14, - }, - }, - "range": Array [ - 344, - 350, - ], - "type": "TSStringKeyword", - }, - }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 14, - "line": 15, - }, - }, - "name": "baz", - "range": Array [ - 366, - 377, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 15, - }, - }, - "range": Array [ - 369, - 377, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 19, - "line": 15, - }, - }, - "range": Array [ - 371, - 377, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 356, - 387, - ], - "readonly": true, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 15, - }, - "start": Object { - "column": 26, - "line": 15, - }, - }, - "range": Array [ - 378, - 386, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 15, - }, - "start": Object { - "column": 28, - "line": 15, - }, - }, - "range": Array [ - 380, - 386, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 11, + "line": 1, }, + }, + "params": Array [ Object { - "accessibility": "public", - "computed": false, - "key": Object { + "constraint": Object { "loc": Object { "end": Object { - "column": 12, - "line": 17, + "column": 24, + "line": 1, }, "start": Object { - "column": 11, - "line": 17, + "column": 22, + "line": 1, }, }, - "name": "g", + "members": Array [], "range": Array [ - 400, - 401, + 22, + 24, ], - "type": "Identifier", + "type": "TSTypeLiteral", }, "loc": Object { "end": Object { - "column": 32, - "line": 17, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 17, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 13, - "line": 17, - }, - }, - "name": "bar", - "range": Array [ - 402, - 413, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "range": Array [ - 405, - 413, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 18, - "line": 17, - }, - }, - "range": Array [ - 407, - 413, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 393, - 421, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 17, - }, - "start": Object { - "column": 25, - "line": 17, - }, - }, - "range": Array [ - 414, - 420, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 17, - }, - "start": Object { - "column": 27, - "line": 17, - }, - }, - "range": Array [ - 416, - 420, - ], - "type": "TSVoidKeyword", + "column": 12, + "line": 1, }, }, - "type": "TSMethodSignature", - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { + "name": Object { "loc": Object { "end": Object { "column": 13, - "line": 18, + "line": 1, }, "start": Object { "column": 12, - "line": 18, + "line": 1, }, }, - "name": "h", + "name": "T", "range": Array [ - 434, - 435, + 12, + 13, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 33, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 14, - "line": 18, - }, - }, - "name": "bar", - "range": Array [ - 436, - 447, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 17, - "line": 18, - }, - }, - "range": Array [ - 439, - 447, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "range": Array [ - 441, - 447, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], "range": Array [ - 426, - 455, + 12, + 24, ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 18, - }, - "start": Object { - "column": 26, - "line": 18, - }, - }, - "range": Array [ - 448, - 454, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 18, - }, - "start": Object { - "column": 28, - "line": 18, - }, - }, - "range": Array [ - 450, - 454, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - Object { - "accessibility": "protected", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 14, - "line": 19, - }, - }, - "name": "i", - "range": Array [ - 470, - 471, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 19, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 16, - "line": 19, - }, - }, - "name": "bar", - "range": Array [ - 472, - 483, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 19, - "line": 19, - }, - }, - "range": Array [ - 475, - 483, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 21, - "line": 19, - }, - }, - "range": Array [ - 477, - 483, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 460, - 491, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 19, - }, - "start": Object { - "column": 28, - "line": 19, - }, - }, - "range": Array [ - 484, - 490, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 19, - }, - "start": Object { - "column": 30, - "line": 19, - }, - }, - "range": Array [ - 486, - 490, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 20, - }, - "start": Object { - "column": 11, - "line": 20, - }, - }, - "name": "j", - "range": Array [ - 503, - 504, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 20, - }, - "start": Object { - "column": 4, - "line": 20, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 20, - }, - "start": Object { - "column": 13, - "line": 20, - }, - }, - "name": "bar", - "range": Array [ - 505, - 516, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 20, - }, - "start": Object { - "column": 16, - "line": 20, - }, - }, - "range": Array [ - 508, - 516, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 20, - }, - "start": Object { - "column": 18, - "line": 20, - }, - }, - "range": Array [ - 510, - 516, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 496, - 524, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 20, - }, - "start": Object { - "column": 25, - "line": 20, - }, - }, - "range": Array [ - 517, - 523, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 20, - }, - "start": Object { - "column": 27, - "line": 20, - }, - }, - "range": Array [ - 519, - 523, - ], - "type": "TSVoidKeyword", - }, - }, - "static": true, - "type": "TSMethodSignature", - }, - Object { - "computed": false, - "export": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 21, - }, - "start": Object { - "column": 11, - "line": 21, - }, - }, - "name": "k", - "range": Array [ - 536, - 537, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 21, - }, - "start": Object { - "column": 4, - "line": 21, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 21, - }, - "start": Object { - "column": 13, - "line": 21, - }, - }, - "name": "bar", - "range": Array [ - 538, - 549, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 21, - }, - "start": Object { - "column": 16, - "line": 21, - }, - }, - "range": Array [ - 541, - 549, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 21, - }, - "start": Object { - "column": 18, - "line": 21, - }, - }, - "range": Array [ - 543, - 549, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 529, - 557, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 21, - }, - "start": Object { - "column": 25, - "line": 21, - }, - }, - "range": Array [ - 550, - 556, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 21, - }, - "start": Object { - "column": 27, - "line": 21, - }, - }, - "range": Array [ - 552, - 556, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 22, - }, - "start": Object { - "column": 13, - "line": 22, - }, - }, - "name": "l", - "range": Array [ - 571, - 572, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 22, - }, - "start": Object { - "column": 4, - "line": 22, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 22, - }, - "start": Object { - "column": 15, - "line": 22, - }, - }, - "name": "bar", - "range": Array [ - 573, - 584, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 22, - }, - "start": Object { - "column": 18, - "line": 22, - }, - }, - "range": Array [ - 576, - 584, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 22, - }, - "start": Object { - "column": 20, - "line": 22, - }, - }, - "range": Array [ - 578, - 584, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 562, - 592, - ], - "readonly": true, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 22, - }, - "start": Object { - "column": 27, - "line": 22, - }, - }, - "range": Array [ - 585, - 591, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 22, - }, - "start": Object { - "column": 29, - "line": 22, - }, - }, - "range": Array [ - 587, - 591, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSMethodSignature", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 23, - }, - "start": Object { - "column": 14, - "line": 1, + "type": "TSTypeParameter", }, - }, - "range": Array [ - 14, - 594, ], - "type": "TSInterfaceBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", "range": Array [ - 10, - 13, + 11, + 25, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 23, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 594, - ], - "type": "TSInterfaceDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 0, - "line": 25, + "column": 48, + "line": 1, }, "start": Object { "column": 0, @@ -62463,14 +60962,14 @@ Object { }, "range": Array [ 0, - 596, + 48, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { @@ -62480,385 +60979,553 @@ Object { }, "range": Array [ 0, - 9, + 4, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 13, + 5, + 11, ], "type": "Identifier", - "value": "Foo", + "value": "Result", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 15, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 20, - 23, + 12, + 13, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 23, - 24, + 14, + 21, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 25, - 31, + 22, + 23, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 32, - 33, + 23, + 24, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 34, - 37, + 24, + 25, ], - "type": "String", - "value": "'a'", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 37, - 38, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 43, - 49, + 28, + 35, ], - "type": "Keyword", - "value": "public", + "type": "Identifier", + "value": "Success", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 35, + "line": 1, }, }, "range": Array [ - 50, - 51, + 35, + 36, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 37, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 36, + "line": 1, }, }, "range": Array [ - 51, - 52, + 36, + 37, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 38, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 37, + "line": 1, }, }, "range": Array [ - 53, - 59, + 37, + 38, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { - "column": 20, - "line": 3, + "column": 39, + "line": 1, }, }, "range": Array [ - 59, - 60, + 39, + 40, ], "type": "Punctuator", - "value": ";", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 4, + "column": 48, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 41, + "line": 1, }, }, "range": Array [ - 65, - 72, + 41, + 48, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "Failure", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 30, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 73, - 74, + 0, + 30, ], - "type": "Identifier", - "value": "b", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 24, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 23, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "TSPropertySignature", + }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 4, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 74, - 75, + 0, + 4, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 8, + "line": 1, }, "start": Object { - "column": 15, - "line": 4, + "column": 5, + "line": 1, }, }, "range": Array [ - 76, - 82, + 5, + 8, ], "type": "Identifier", - "value": "string", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 4, + "column": 10, + "line": 1, }, "start": Object { - "column": 21, - "line": 4, + "column": 9, + "line": 1, }, }, "range": Array [ - 82, - 83, + 9, + 10, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 5, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 11, + "line": 1, }, }, "range": Array [ - 88, - 97, + 11, + 12, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 5, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, + "column": 12, + "line": 1, }, }, "range": Array [ - 98, - 99, + 12, + 15, ], "type": "Identifier", - "value": "c", + "value": "bar", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 5, + "line": 1, }, "start": Object { "column": 15, - "line": 5, + "line": 1, }, }, "range": Array [ - 99, - 100, + 15, + 16, ], "type": "Punctuator", "value": ":", @@ -62867,16 +61534,16 @@ Object { "loc": Object { "end": Object { "column": 23, - "line": 5, + "line": 1, }, "start": Object { "column": 17, - "line": 5, + "line": 1, }, }, "range": Array [ - 101, - 107, + 17, + 23, ], "type": "Identifier", "value": "string", @@ -62885,448 +61552,828 @@ Object { "loc": Object { "end": Object { "column": 24, - "line": 5, + "line": 1, }, "start": Object { "column": 23, - "line": 5, + "line": 1, }, }, "range": Array [ - 107, - 108, + 23, + 24, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 113, - 119, - ], - "type": "Keyword", - "value": "static", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 28, + "line": 1, }, "start": Object { - "column": 11, - "line": 6, + "column": 25, + "line": 1, }, }, "range": Array [ - 120, - 121, + 25, + 28, ], "type": "Identifier", - "value": "d", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 29, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 28, + "line": 1, }, }, "range": Array [ - 121, - 122, + 28, + 29, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 30, + "line": 1, }, "start": Object { - "column": 14, - "line": 6, + "column": 29, + "line": 1, }, }, "range": Array [ - 123, - 129, + 29, + 30, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-assertion.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 27, + ], + "type": "TSTypeAssertion", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "TSAnyKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 27, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 21, - "line": 6, + "column": 28, + "line": 1, }, "start": Object { - "column": 20, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 129, - 130, + 0, + 28, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 5, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 135, - 141, + 0, + 5, ], "type": "Keyword", - "value": "export", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 9, + "line": 1, }, "start": Object { - "column": 11, - "line": 7, + "column": 6, + "line": 1, }, }, "range": Array [ - 142, - 143, + 6, + 9, ], "type": "Identifier", - "value": "e", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 11, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 10, + "line": 1, }, }, "range": Array [ - 143, - 144, + 10, + 11, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 7, + "column": 13, + "line": 1, }, "start": Object { - "column": 14, - "line": 7, + "column": 12, + "line": 1, }, }, "range": Array [ - 145, - 151, + 12, + 13, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 16, + "line": 1, }, "start": Object { - "column": 20, - "line": 7, + "column": 13, + "line": 1, }, }, "range": Array [ - 151, - 152, + 13, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 8, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 16, + "line": 1, }, }, "range": Array [ - 157, - 165, + 16, + 17, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 27, + "line": 1, }, "start": Object { - "column": 13, - "line": 8, + "column": 26, + "line": 1, }, }, "range": Array [ - 166, - 167, + 26, + 27, ], - "type": "Identifier", - "value": "f", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 28, + "line": 1, }, "start": Object { - "column": 14, - "line": 8, + "column": 27, + "line": 1, }, }, "range": Array [ - 167, - 168, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-assertion-arrow-function.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "asserted2", + "range": Array [ + 4, + 13, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "name": "n", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 40, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 42, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "n", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 22, + 42, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 43, + ], + "type": "TSTypeAssertion", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "TSAnyKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 43, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 22, - "line": 8, + "column": 44, + "line": 1, }, "start": Object { - "column": 16, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 169, - 175, + 0, + 44, ], - "type": "Identifier", - "value": "string", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 45, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, - "line": 8, + "column": 3, + "line": 1, }, "start": Object { - "column": 22, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 175, - 176, + 0, + 3, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 13, + "line": 1, }, "start": Object { "column": 4, - "line": 10, + "line": 1, }, }, "range": Array [ - 182, - 188, + 4, + 13, ], - "type": "Keyword", - "value": "public", + "type": "Identifier", + "value": "asserted2", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 10, + "column": 15, + "line": 1, }, "start": Object { - "column": 11, - "line": 10, + "column": 14, + "line": 1, }, }, "range": Array [ - 189, - 190, + 14, + 15, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 10, + "column": 17, + "line": 1, }, "start": Object { - "column": 12, - "line": 10, + "column": 16, + "line": 1, }, }, "range": Array [ - 190, - 193, + 16, + 17, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 10, + "column": 20, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 17, + "line": 1, }, }, "range": Array [ - 193, - 194, + 17, + 20, ], - "type": "Punctuator", - "value": ":", - }, + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "(", + }, Object { "loc": Object { "end": Object { "column": 23, - "line": 10, + "line": 1, }, "start": Object { - "column": 17, - "line": 10, + "column": 22, + "line": 1, }, }, "range": Array [ - 195, - 201, + 22, + 23, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 10, + "line": 1, }, "start": Object { "column": 23, - "line": 10, + "line": 1, }, }, "range": Array [ - 201, - 202, + 23, + 24, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "n", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 10, + "line": 1, }, "start": Object { "column": 24, - "line": 10, + "line": 1, }, }, "range": Array [ - 202, - 203, + 24, + 25, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 10, + "column": 28, + "line": 1, }, "start": Object { "column": 26, - "line": 10, + "line": 1, }, }, "range": Array [ - 204, - 210, + 26, + 28, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, ], "type": "Identifier", - "value": "string", + "value": "n", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 10, + "column": 40, + "line": 1, }, "start": Object { - "column": 32, - "line": 10, + "column": 39, + "line": 1, }, }, "range": Array [ - 210, - 211, + 39, + 40, ], "type": "Punctuator", "value": ";", @@ -63334,233 +62381,55445 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 11, + "column": 42, + "line": 1, }, "start": Object { - "column": 4, - "line": 11, + "column": 41, + "line": 1, }, }, "range": Array [ - 216, - 223, + 41, + 42, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 11, + "column": 43, + "line": 1, }, "start": Object { - "column": 12, - "line": 11, + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-guard-in-arrow-function.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "isString", + "range": Array [ + 6, + 14, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 55, + 63, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "===", + "range": Array [ + 55, + 76, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 68, + 76, + ], + "raw": "'string'", + "type": "Literal", + "value": "string", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 76, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 78, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 18, + 24, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSAnyKeyword", + }, + }, + }, + ], + "range": Array [ + 17, + 78, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "range": Array [ + 27, + 38, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + }, + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 78, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 79, + ], + "sourceType": "module", + "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": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 14, + ], + "type": "Identifier", + "value": "isString", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "any", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 41, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 54, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 64, + 67, + ], + "type": "Punctuator", + "value": "===", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 68, + 76, + ], + "type": "String", + "value": "'string'", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-guard-in-function.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 59, + 60, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 52, + 60, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "===", + "range": Array [ + 52, + 73, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 65, + 73, + ], + "raw": "'string'", + "type": "Literal", + "value": "string", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 45, + 73, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 75, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "isString", + "range": Array [ + 9, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 18, + 24, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSAnyKeyword", + }, + }, + }, + ], + "range": Array [ + 0, + 75, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "range": Array [ + 27, + 38, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + }, + "type": "FunctionDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 75, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "Identifier", + "value": "isString", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "any", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 45, + 51, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 52, + 58, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 61, + 64, + ], + "type": "Punctuator", + "value": "===", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 65, + 73, + ], + "type": "String", + "value": "'string'", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-guard-in-interface.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "isString", + "range": Array [ + 18, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "node", + "range": Array [ + 27, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 36, + ], + "type": "TSAnyKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 54, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 53, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "node", + "range": Array [ + 39, + 43, + ], + "type": "Identifier", + }, + "range": Array [ + 39, + 53, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSStringKeyword", + }, + }, + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 56, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 26, + ], + "type": "Identifier", + "value": "isString", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Identifier", + "value": "node", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 36, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 43, + ], + "type": "Identifier", + "value": "node", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 46, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 37, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-guard-in-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "isBar", + "range": Array [ + 14, + 19, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 75, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 51, + 55, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "operator": "instanceof", + "range": Array [ + 51, + 70, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 67, + 70, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 44, + 71, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 75, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 19, + 75, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 23, + 27, + ], + "type": "TSThisType", + }, + "range": Array [ + 23, + 37, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "isBaz", + "range": Array [ + 78, + 83, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 78, + 145, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 121, + 125, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "operator": "instanceof", + "range": Array [ + 121, + 140, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 6, + }, + "start": Object { + "column": 27, + "line": 6, + }, + }, + "name": "Foo", + "range": Array [ + 137, + 140, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 114, + 141, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 32, + "line": 5, + }, + }, + "range": Array [ + 108, + 145, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 86, + 145, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 88, + 104, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 90, + 94, + ], + "type": "TSThisType", + }, + "range": Array [ + 90, + 104, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "TSStringKeyword", + }, + }, + }, + }, + "type": "ArrowFunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 147, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 147, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 148, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 19, + ], + "type": "Identifier", + "value": "isBar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 23, + 27, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 44, + 50, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 51, + 55, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 56, + 66, + ], + "type": "Keyword", + "value": "instanceof", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 67, + 70, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 78, + 83, + ], + "type": "Identifier", + "value": "isBaz", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 5, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 90, + 94, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "range": Array [ + 95, + 97, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 5, + }, + "start": Object { + "column": 29, + "line": 5, + }, + }, + "range": Array [ + 105, + 107, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 5, + }, + "start": Object { + "column": 32, + "line": 5, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 114, + 120, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 121, + 125, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 126, + 136, + ], + "type": "Keyword", + "value": "instanceof", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 6, + }, + "start": Object { + "column": 27, + "line": 6, + }, + }, + "range": Array [ + 137, + 140, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 6, + }, + "start": Object { + "column": 30, + "line": 6, + }, + }, + "range": Array [ + 140, + 141, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 144, + 145, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 146, + 147, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 3, + 40, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "type": "ExpressionStatement", + }, + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 84, + 87, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 44, + 87, + ], + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "A", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "range": Array [ + 68, + 69, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 56, + 81, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 134, + 137, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "baz", + "range": Array [ + 97, + 100, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 88, + 137, + ], + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "params": Array [ + Object { + "default": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 126, + 129, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 126, + 129, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "A", + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + }, + "range": Array [ + 112, + 129, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 100, + 131, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 20, + ], + "type": "Block", + "value": " comment 1 ", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 38, + ], + "type": "Block", + "value": " comment 2 ", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 67, + ], + "type": "Block", + "value": " aaa ", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 79, + ], + "type": "Block", + "value": " bbb ", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 111, + ], + "type": "Block", + "value": " aaa ", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 114, + 123, + ], + "type": "Block", + "value": " bbb ", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 138, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 52, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 37, + "line": 2, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 82, + 83, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 96, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 97, + 100, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 126, + 129, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 130, + 131, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 131, + 132, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 44, + "line": 3, + }, + }, + "range": Array [ + 132, + 133, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 134, + 135, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 48, + "line": 3, + }, + }, + "range": Array [ + 136, + 137, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-reference-comments.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "mBuffers", + "range": Array [ + 26, + 34, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 51, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 26, + 75, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 34, + 74, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 36, + 74, + ], + "type": "TSTypeReference", + "typeName": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "interop", + "range": Array [ + 36, + 43, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 36, + 53, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "name": "Reference", + "range": Array [ + 44, + 53, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 54, + 57, + ], + "type": "TSAnyKeyword", + }, + ], + "range": Array [ + 53, + 74, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 77, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "AudioBufferList", + "range": Array [ + 6, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 77, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 58, + 73, + ], + "type": "Block", + "value": "AudioBuffer", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 21, + ], + "type": "Identifier", + "value": "AudioBufferList", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "Identifier", + "value": "mBuffers", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 36, + 43, + ], + "type": "Identifier", + "value": "interop", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 44, + 53, + ], + "type": "Identifier", + "value": "Reference", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 54, + 57, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-bigint.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSBigIntKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "bigint", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-boolean.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSBooleanKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "Identifier", + "value": "boolean", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-false.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSLiteralType", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "Boolean", + "value": "false", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-never.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSNeverKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "Identifier", + "value": "never", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-null.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSNullKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Keyword", + "value": "null", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-number.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "number", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-object.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSObjectKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "object", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-string.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSStringKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "string", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-symbol.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSSymbolKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "symbol", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-true.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSLiteralType", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Boolean", + "value": "true", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-undefined.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "TSUndefinedKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "Identifier", + "value": "undefined", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-unknown.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSUnknownKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "Identifier", + "value": "unknown", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-void.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSVoidKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Keyword", + "value": "void", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-method-signature.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "h", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 17, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 36, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "g", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 44, + 50, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 39, + 55, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 51, + 54, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSMethodSignature", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + }, + "range": Array [ + 41, + 42, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 40, + 43, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "range": Array [ + 11, + 57, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "h", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 44, + 47, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-this.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "name": "addClickListener", + "range": Array [ + 23, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 65, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "onclick", + "range": Array [ + 40, + 79, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 47, + 79, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "name": "this", + "range": Array [ + 50, + 60, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 56, + 60, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "name": "e", + "range": Array [ + 62, + 70, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 70, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 65, + 70, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "name": "Event", + "range": Array [ + 65, + 70, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 49, + 79, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 72, + 79, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + ], + "range": Array [ + 23, + 87, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 80, + 86, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 60, + "line": 2, + }, + }, + "range": Array [ + 82, + 86, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 89, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "UIElement", + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 89, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 90, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + "value": "UIElement", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 23, + 39, + ], + "type": "Identifier", + "value": "addClickListener", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 40, + 47, + ], + "type": "Identifier", + "value": "onclick", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 50, + 54, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 56, + 60, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + "value": "e", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 65, + 70, + ], + "type": "Identifier", + "value": "Event", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 2, + }, + "start": Object { + "column": 48, + "line": 2, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 72, + 74, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 60, + "line": 2, + }, + }, + "range": Array [ + 82, + 86, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 65, + "line": 2, + }, + "start": Object { + "column": 64, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "unique", + "range": Array [ + 9, + 22, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSSymbolKeyword", + }, + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Identifier", + "value": "unique", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Identifier", + "value": "symbol", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/unknown-type-annotation.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 16, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 16, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "TSUnknownKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "Identifier", + "value": "unknown", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-definite-assignment.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 16, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 16, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "y", + "range": Array [ + 22, + 32, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 32, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 32, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 18, + 33, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 38, + 48, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSObjectKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 38, + 48, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 49, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "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": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "type": "Identifier", + "value": "string", + }, + 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": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Identifier", + "value": "object", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-dotted-type.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 14, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 14, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "type": "TSTypeReference", + "typeName": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 12, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-type.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 4, + 15, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 15, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 28, + ], + "raw": "\\"Nicholas\\"", + "type": "Literal", + "value": "Nicholas", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 28, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 34, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 48, + 53, + ], + "raw": "\\"Bar\\"", + "type": "Literal", + "value": "Bar", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 53, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 30, + 54, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 8, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Identifier", + "value": "string", + }, + 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": 28, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 28, + ], + "type": "String", + "value": "\\"Nicholas\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 48, + 53, + ], + "type": "String", + "value": "\\"Bar\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 21, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/abstract-class.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "ClassBody", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "superClass": null, + "type": "TSAbstractClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 16, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 22, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/class.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "ClassBody", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/enum.src 1`] = ` +Object { + "body": Array [ + Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "Bar", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "Baz", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "TSEnumMember", + }, + ], + "range": Array [ + 0, + 37, + ], + "type": "TSEnumDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Keyword", + "value": "enum", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "Baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/function.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "declare": true, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 0, + 28, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSDeclareFunction", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 16, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "Keyword", + "value": "void", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/interface.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 26, + ], + "type": "TSInterfaceBody", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/module.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/namespace.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 26, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "Identifier", + "value": "namespace", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/type-alias.src 1`] = ` +Object { + "body": Array [ + Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/variable.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 12, + 20, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "TSAnyKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "VariableDeclarator", + }, + ], + "declare": true, + "kind": "var", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 32, + 37, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "configurable", + "range": Array [ + 19, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 38, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 38, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 70, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 60, + 64, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "_x", + "range": Array [ + 65, + 67, + ], + "type": "Identifier", + }, + "range": Array [ + 60, + 67, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 68, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 70, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 48, + 70, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 72, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Point", + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + "value": "Point", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 31, + ], + "type": "Identifier", + "value": "configurable", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 32, + 37, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 46, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 60, + 64, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 65, + 67, + ], + "type": "Identifier", + "value": "_x", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 25, + 34, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 30, + 34, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + }, + ], + "range": Array [ + 23, + 36, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 37, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 80, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 68, + 72, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 35, + "line": 3, + }, + }, + "name": "_bar", + "range": Array [ + 73, + 77, + ], + "type": "Identifier", + }, + "range": Array [ + 68, + 77, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 61, + 78, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 59, + 80, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 56, + 80, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 82, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Other", + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + "value": "Other", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 30, + 34, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 61, + 67, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 68, + 72, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 3, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 35, + "line": 3, + }, + }, + "range": Array [ + 73, + 77, + ], + "type": "Identifier", + "value": "_bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "hidden", + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 53, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "_z", + "range": Array [ + 48, + 50, + ], + "type": "Identifier", + }, + "range": Array [ + 43, + 50, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 36, + 51, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 34, + 53, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 31, + 53, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 55, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + "value": "hidden", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 48, + 50, + ], + "type": "Identifier", + "value": "_z", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "adminonly", + "range": Array [ + 18, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 27, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "y", + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 76, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "name": "_y", + "range": Array [ + 63, + 65, + ], + "type": "Identifier", + }, + "range": Array [ + 58, + 65, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "operator": "=", + "range": Array [ + 58, + 69, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 58, + 70, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 48, + 76, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 44, + 76, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 78, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "User", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "User", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Identifier", + "value": "adminonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 63, + 65, + ], + "type": "Identifier", + "value": "_y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 75, + 76, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/class-decorators/class-decorator.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "ClassBody", + }, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "sealed", + "range": Array [ + 1, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "Qux", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 7, + ], + "type": "Identifier", + "value": "sealed", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "Qux", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/class-decorators/class-decorator-factory.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 56, + 58, + ], + "type": "ClassBody", + }, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "selector", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 17, + 32, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "raw": "'foo'", + "type": "Literal", + "value": "foo", + }, + }, + ], + "range": Array [ + 11, + 35, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "Component", + "range": Array [ + 1, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 36, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "name": "FooComponent", + "range": Array [ + 43, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 10, + ], + "type": "Identifier", + "value": "Component", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + "value": "selector", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "String", + "value": "'foo'", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 37, + 42, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 43, + 55, + ], + "type": "Identifier", + "value": "FooComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 29, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "onlyRead", + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 30, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 30, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "instanceMethod", + "range": Array [ + 35, + 49, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 54, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 49, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 56, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "onlyRead", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 29, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 35, + 49, + ], + "type": "Identifier", + "value": "instanceMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 25, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "staticMethod", + "range": Array [ + 37, + 49, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 54, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 49, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 56, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 37, + 49, + ], + "type": "Identifier", + "value": "staticMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "onlyRead", + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 23, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "instanceMethod", + "range": Array [ + 28, + 42, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 47, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 45, + 47, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 42, + 47, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 49, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "onlyRead", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 28, + 42, + ], + "type": "Identifier", + "value": "instanceMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "staticMethod", + "range": Array [ + 30, + 42, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 47, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 45, + 47, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 42, + 47, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 49, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "D", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "D", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "Identifier", + "value": "staticMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 20, + 31, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 113, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 81, + 85, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "name": "title", + "range": Array [ + 86, + 91, + ], + "type": "Identifier", + }, + "range": Array [ + 81, + 91, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "operator": "=", + "range": Array [ + 81, + 106, + ], + "right": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "name": "config", + "range": Array [ + 94, + 100, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "name": "title", + "range": Array [ + 101, + 106, + ], + "type": "Identifier", + }, + "range": Array [ + 94, + 106, + ], + "type": "MemberExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 81, + 107, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 55, + "line": 2, + }, + }, + "range": Array [ + 71, + 113, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "APP_CONFIG", + "range": Array [ + 40, + 50, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "Inject", + "range": Array [ + 33, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 51, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 51, + ], + "type": "Decorator", + }, + ], + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "name": "config", + "range": Array [ + 52, + 69, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 58, + 69, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 60, + 69, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "name": "AppConfig", + "range": Array [ + 60, + 69, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 31, + 113, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 115, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Service", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 115, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 116, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + "value": "Service", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 31, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 39, + ], + "type": "Identifier", + "value": "Inject", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 50, + ], + "type": "Identifier", + "value": "APP_CONFIG", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 52, + 58, + ], + "type": "Identifier", + "value": "config", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 60, + 69, + ], + "type": "Identifier", + "value": "AppConfig", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 2, + }, + "start": Object { + "column": 55, + "line": 2, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 81, + 85, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 86, + 91, + ], + "type": "Identifier", + "value": "title", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 94, + 100, + ], + "type": "Identifier", + "value": "config", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 101, + 106, + ], + "type": "Identifier", + "value": "title", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 50, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 48, + 50, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 33, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "special", + "range": Array [ + 21, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 34, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 34, + ], + "type": "Decorator", + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 35, + 46, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 19, + 50, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 52, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "Identifier", + "value": "special", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 33, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 37, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 63, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 61, + 63, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 42, + 46, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "special", + "range": Array [ + 34, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 34, + 47, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 33, + 47, + ], + "type": "Decorator", + }, + ], + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 48, + 59, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 51, + 59, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 32, + 63, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 65, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "StaticFoo", + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 65, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 66, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + "value": "StaticFoo", + }, + 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": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "Identifier", + "value": "special", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 42, + 46, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 48, + 51, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "greet", + "range": Array [ + 20, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 95, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 67, + 75, + ], + "raw": "\\"Hello \\"", + "type": "Literal", + "value": "Hello ", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "operator": "+", + "range": Array [ + 67, + 82, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "name", + "range": Array [ + 78, + 82, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "operator": "+", + "range": Array [ + 67, + 88, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 85, + 88, + ], + "raw": "\\"!\\"", + "type": "Literal", + "value": "!", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 60, + 89, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 50, + 95, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "required", + "range": Array [ + 27, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 35, + ], + "type": "Decorator", + }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "name": "name", + "range": Array [ + 36, + 48, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 25, + 95, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 97, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Greeter", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 97, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 98, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + "value": "Greeter", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 25, + ], + "type": "Identifier", + "value": "greet", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "Identifier", + "value": "required", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 36, + 40, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 60, + 66, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 67, + 75, + ], + "type": "String", + "value": "\\"Hello \\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 78, + 82, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 85, + 88, + ], + "type": "String", + "value": "\\"!\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "greet", + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 108, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 80, + 88, + ], + "raw": "\\"Hello \\"", + "type": "Literal", + "value": "Hello ", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "operator": "+", + "range": Array [ + 80, + 95, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "name", + "range": Array [ + 91, + 95, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "operator": "+", + "range": Array [ + 80, + 101, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 98, + 101, + ], + "raw": "\\"!\\"", + "type": "Literal", + "value": "!", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 73, + 102, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 108, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "required", + "range": Array [ + 40, + 48, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 39, + 48, + ], + "type": "Decorator", + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "name": "name", + "range": Array [ + 49, + 61, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 38, + 108, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 110, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "StaticGreeter", + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 110, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 111, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + "value": "StaticGreeter", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + "value": "greet", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 40, + 48, + ], + "type": "Identifier", + "value": "required", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 49, + 53, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 73, + 79, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 80, + 88, + ], + "type": "String", + "value": "\\"Hello \\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 91, + 95, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 98, + 101, + ], + "type": "String", + "value": "\\"!\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 101, + 102, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 107, + 108, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 109, + 110, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Input", + "range": Array [ + 27, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "data", + "range": Array [ + 35, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 40, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "Output", + "range": Array [ + 46, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 46, + 54, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, + 54, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "click", + "range": Array [ + 59, + 64, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, + 86, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "EventEmitter", + "range": Array [ + 71, + 83, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 67, + 85, + ], + "type": "NewExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 88, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 88, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 88, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "Identifier", + "value": "Input", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 35, + 39, + ], + "type": "Identifier", + "value": "data", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 46, + 52, + ], + "type": "Identifier", + "value": "Output", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 59, + 64, + ], + "type": "Identifier", + "value": "click", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 67, + 70, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 71, + 83, + ], + "type": "Identifier", + "value": "EventEmitter", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 28, + 32, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "configurable", + "range": Array [ + 15, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 33, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 33, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "name": "prop1", + "range": Array [ + 41, + 46, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 47, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 67, + 72, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "name": "configurable", + "range": Array [ + 54, + 66, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 54, + 73, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 73, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "name": "prop2", + "range": Array [ + 85, + 90, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 91, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 93, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 93, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 93, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 27, + ], + "type": "Identifier", + "value": "configurable", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 28, + 32, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 41, + 46, + ], + "type": "Identifier", + "value": "prop1", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 54, + 66, + ], + "type": "Identifier", + "value": "configurable", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 67, + 72, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 78, + 84, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 85, + 90, + ], + "type": "Identifier", + "value": "prop2", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 90, + 91, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 30, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 37, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 39, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 28, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "qux", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "name": "b", + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 33, + 51, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 53, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 54, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "qux", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/class-empty-extends.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 17, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/class-empty-extends-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "TSClassImplements", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 17, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 28, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/class-extends-empty-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "implements": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 17, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 32, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/class-multiple-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 36, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "TSClassImplements", + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 18, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 31, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/decorator-on-enum-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "dec", + "range": Array [ + 1, + 4, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "E", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 0, + 14, + ], + "type": "TSEnumDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 4, + ], + "type": "Identifier", + "value": "dec", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 9, + ], + "type": "Keyword", + "value": "enum", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "E", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/decorator-on-interface-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "TSInterfaceBody", + }, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "deco", + "range": Array [ + 1, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 7, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "M", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "Identifier", + "value": "deco", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "M", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/empty-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 16, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 14, + 16, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "module", + "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": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ">", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/enum-with-keywords.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 68, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "members": Array [], + "modifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 14, + ], + "type": "TSPrivateKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "TSPublicKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 31, + ], + "type": "TSProtectedKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStaticKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 47, + ], + "type": "TSReadonlyKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 56, + ], + "type": "TSAbstractKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 62, + ], + "type": "TSAsyncKeyword", + }, + ], + "range": Array [ + 63, + 72, + ], + "type": "TSEnumDeclaration", + }, + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 14, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 31, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 47, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 56, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 62, + ], + "type": "Identifier", + "value": "async", + }, + Object { + "loc": Object { + "end": Object { + "column": 67, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 67, + ], + "type": "Keyword", + "value": "enum", + }, + Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 68, + "line": 1, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + "value": "X", + }, + Object { + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 70, + "line": 1, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/index-signature-parameters.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 16, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 27, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 46, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 48, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 26, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 27, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "e", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "TSInterfaceHeritage", + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 22, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "e", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "export": true, + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 48, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 25, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 50, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 49, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 52, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 54, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "static": true, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 48, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 30, + 41, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 41, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 49, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 51, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 30, + 41, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 41, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 49, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 51, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 48, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 46, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "TSVoidKeyword", + }, + }, + "static": true, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 48, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-multiple-extends.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 40, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "TSInterfaceHeritage", + }, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "TSInterfaceHeritage", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 33, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 35, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 37, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 36, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 38, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 25, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 38, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 40, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 37, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 39, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 35, + ], + "static": true, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 37, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-with-default-value.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "raw": "'a'", + "type": "Literal", + "value": "a", + }, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 36, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 21, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 38, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "String", + "value": "'a'", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/solo-const.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [], + "kind": "const", + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "sourceType": "module", + "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", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/expressions/call-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 3, + 6, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 10, + 23, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "TSNumberKeyword", + }, + ], + "range": Array [ + 13, + 21, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 10, + 24, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/expressions/new-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 20, + ], + "type": "NewExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 15, + 18, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 20, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "module", + "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": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/expressions/tagged-template-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "quasi": Object { + "expressions": Array [], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "quasis": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 13, + ], + "tail": true, + "type": "TemplateElement", + "value": Object { + "cooked": "baz", + "raw": "baz", + }, + }, + ], + "range": Array [ + 8, + 13, + ], + "type": "TemplateLiteral", + }, + "range": Array [ + 0, + 13, + ], + "tag": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "type": "TaggedTemplateExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 3, + 8, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Template", + "value": "\`baz\`", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 34, + 54, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 49, + 53, + ], + "raw": "'fs'", + "type": "Literal", + "value": "fs", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "fs", + "range": Array [ + 41, + 43, + ], + "type": "Identifier", + }, + "range": Array [ + 41, + 43, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 56, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 29, + ], + "raw": "\\"i-use-things\\"", + "type": "Literal", + "value": "i-use-things", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 29, + ], + "type": "String", + "value": "\\"i-use-things\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 41, + 43, + ], + "type": "Identifier", + "value": "fs", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 49, + 53, + ], + "type": "String", + "value": "'fs'", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "select", + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "selector", + "range": Array [ + 48, + 64, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 56, + 64, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 58, + 64, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 32, + 82, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 65, + 81, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 67, + 81, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "name": "Selection", + "range": Array [ + 67, + 76, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 54, + "line": 2, + }, + }, + "range": Array [ + 77, + 80, + ], + "type": "TSAnyKeyword", + }, + ], + "range": Array [ + 76, + 81, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + "type": "TSDeclareFunction", + }, + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 25, + 82, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 84, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "d3", + "range": Array [ + 18, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 84, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 84, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "Identifier", + "value": "namespace", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "Identifier", + "value": "d3", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 25, + 31, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + "value": "select", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 48, + 56, + ], + "type": "Identifier", + "value": "selector", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 58, + 64, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 67, + 76, + ], + "type": "Identifier", + "value": "Selection", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 54, + "line": 2, + }, + }, + "range": Array [ + 77, + 80, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/global-module-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 43, + 51, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "global", + "range": Array [ + 36, + 42, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 51, + ], + "type": "TSModuleDeclaration", + }, + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 29, + "line": 5, + }, + }, + "range": Array [ + 81, + 89, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "name": "global", + "range": Array [ + 74, + 80, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 56, + 89, + ], + "type": "TSModuleDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 91, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "global": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "global", + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 91, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 92, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Keyword", + "value": "global", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "Keyword", + "value": "global", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 56, + 63, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 12, + "line": 5, + }, + }, + "range": Array [ + 64, + 73, + ], + "type": "Identifier", + "value": "namespace", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 74, + 80, + ], + "type": "Keyword", + "value": "global", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 5, + }, + "start": Object { + "column": 29, + "line": 5, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 90, + 91, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/module-with-default-exports.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "method", + "range": Array [ + 52, + 58, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 52, + 66, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 64, + 66, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 58, + 66, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 60, + 63, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "name": "C", + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + }, + }, + }, + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 42, + 73, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "C", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 34, + 73, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 19, + 73, + ], + "type": "ExportDefaultDeclaration", + }, + Object { + "declaration": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 34, + "line": 5, + }, + }, + "range": Array [ + 108, + 110, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 5, + }, + "start": Object { + "column": 28, + "line": 5, + }, + }, + "name": "bar", + "range": Array [ + 102, + 105, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 93, + 110, + ], + "type": "FunctionDeclaration", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 78, + 110, + ], + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 112, + ], + "type": "TSModuleBlock", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 112, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 114, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 26, + 33, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 34, + 39, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 52, + 58, + ], + "type": "Identifier", + "value": "method", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 78, + 84, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 85, + 92, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "range": Array [ + 93, + 101, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 5, + }, + "start": Object { + "column": 28, + "line": 5, + }, + }, + "range": Array [ + 102, + 105, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 5, + }, + "start": Object { + "column": 31, + "line": 5, + }, + }, + "range": Array [ + 105, + 106, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 5, + }, + "start": Object { + "column": 32, + "line": 5, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 5, + }, + "start": Object { + "column": 34, + "line": 5, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 35, + "line": 5, + }, + }, + "range": Array [ + 109, + 110, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 111, + 112, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/nested-internal-module.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 31, + 44, + ], + "raw": "'hello world'", + "type": "Literal", + "value": "hello world", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 27, + 44, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 23, + 44, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 16, + 44, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "name": "constructor", + "range": Array [ + 78, + 89, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 78, + 129, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 56, + "line": 5, + }, + }, + "range": Array [ + 126, + 129, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "params": Array [ + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 5, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 27, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 97, + 106, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 28, + "line": 5, + }, + }, + "range": Array [ + 98, + 106, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 30, + "line": 5, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "range": Array [ + 90, + 106, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 38, + "line": 5, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 45, + "line": 5, + }, + }, + "name": "y", + "range": Array [ + 115, + 124, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 46, + "line": 5, + }, + }, + "range": Array [ + 116, + 124, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 48, + "line": 5, + }, + }, + "range": Array [ + 118, + 124, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "range": Array [ + 108, + 124, + ], + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 89, + 129, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 68, + 135, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "name": "Point", + "range": Array [ + 62, + 67, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 56, + 135, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 49, + 135, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "name": "name", + "range": Array [ + 200, + 204, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "range": Array [ + 200, + 213, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "range": Array [ + 204, + 212, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 18, + "line": 9, + }, + }, + "range": Array [ + 206, + 212, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 10, + }, + "start": Object { + "column": 28, + "line": 8, + }, + }, + "range": Array [ + 186, + 223, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 8, + }, + "start": Object { + "column": 25, + "line": 8, + }, + }, + "name": "Id", + "range": Array [ + 183, + 185, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 173, + 223, + ], + "type": "TSInterfaceDeclaration", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 10, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 166, + 223, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "range": Array [ + 156, + 229, + ], + "type": "TSModuleBlock", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 18, + "line": 7, + }, + }, + "name": "B", + "range": Array [ + 154, + 155, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 147, + 229, + ], + "type": "TSModuleDeclaration", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 140, + 229, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 12, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 231, + ], + "type": "TSModuleBlock", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 12, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 231, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 12, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 231, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 31, + 44, + ], + "type": "String", + "value": "'hello world'", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 49, + 55, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 56, + 61, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 62, + 67, + ], + "type": "Identifier", + "value": "Point", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 78, + 89, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 5, + }, + }, + "range": Array [ + 90, + 96, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 27, + "line": 5, + }, + }, + "range": Array [ + 97, + 98, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 5, + }, + "start": Object { + "column": 28, + "line": 5, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 30, + "line": 5, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 5, + }, + "start": Object { + "column": 36, + "line": 5, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 5, + }, + "start": Object { + "column": 38, + "line": 5, + }, + }, + "range": Array [ + 108, + 114, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 45, + "line": 5, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 46, + "line": 5, + }, + }, + "range": Array [ + 116, + 117, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 48, + "line": 5, + }, + }, + "range": Array [ + 118, + 124, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 54, + "line": 5, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 56, + "line": 5, + }, + }, + "range": Array [ + 126, + 127, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 58, + "line": 5, + }, + }, + "range": Array [ + 128, + 129, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 134, + 135, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 140, + 146, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 147, + 153, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 18, + "line": 7, + }, + }, + "range": Array [ + 154, + 155, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "range": Array [ + 156, + 157, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 166, + 172, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 173, + 182, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 8, + }, + "start": Object { + "column": 25, + "line": 8, + }, + }, + "range": Array [ + 183, + 185, + ], + "type": "Identifier", + "value": "Id", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 8, + }, + "start": Object { + "column": 28, + "line": 8, + }, + }, + "range": Array [ + 186, + 187, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "range": Array [ + 200, + 204, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "range": Array [ + 204, + 205, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 9, + }, + "start": Object { + "column": 18, + "line": 9, + }, + }, + "range": Array [ + 206, + 212, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 24, + "line": 9, + }, + }, + "range": Array [ + 212, + 213, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 10, + }, + "start": Object { + "column": 8, + "line": 10, + }, + }, + "range": Array [ + 222, + 223, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 11, + }, + }, + "range": Array [ + 228, + 229, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 12, + }, + "start": Object { + "column": 0, + "line": 12, + }, + }, + "range": Array [ + 230, + 231, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 31, + ], + "raw": "\\"hot-new-module\\"", + "type": "Literal", + "value": "hot-new-module", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "type": "TSModuleDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 31, + ], + "type": "String", + "value": "\\"hot-new-module\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/array-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "TSArrayType", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "]", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/conditional.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 47, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + "type": "TSConditionalType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/conditional-infer.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Element", + "range": Array [ + 5, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 37, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "range": Array [ + 35, + 36, + ], + "type": "TSTypeParameter", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 39, + ], + "type": "TSArrayType", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 46, + 47, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 47, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 14, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 12, + 15, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 12, + ], + "type": "Identifier", + "value": "Element", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ">", + }, + 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": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 34, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/conditional-infer-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Unpacked", + "range": Array [ + 5, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 126, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 31, + 40, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 32, + 39, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "U", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "range": Array [ + 38, + 39, + ], + "type": "TSTypeParameter", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 31, + 42, + ], + "type": "TSArrayType", + }, + "falseType": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 63, + 70, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "name": "U", + "range": Array [ + 69, + 70, + ], + "type": "Identifier", + }, + "range": Array [ + 69, + 70, + ], + "type": "TSTypeParameter", + }, + }, + "falseType": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "name": "T", + "range": Array [ + 83, + 84, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 93, + 109, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "Promise", + "range": Array [ + 93, + 100, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 101, + 108, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "name": "U", + "range": Array [ + 107, + 108, + ], + "type": "Identifier", + }, + "range": Array [ + 107, + 108, + ], + "type": "TSTypeParameter", + }, + }, + ], + "range": Array [ + 100, + 109, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "name": "T", + "range": Array [ + 124, + 125, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 83, + 125, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "name": "U", + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 53, + 125, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "U", + "range": Array [ + 73, + 74, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 21, + 125, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "name": "U", + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 13, + 16, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 127, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 13, + ], + "type": "Identifier", + "value": "Unpacked", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 30, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 32, + 37, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 55, + 62, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 63, + 68, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 75, + 76, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 85, + 92, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 93, + 100, + ], + "type": "Identifier", + "value": "Promise", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 101, + 106, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "range": Array [ + 107, + 108, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 31, + "line": 4, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 4, + }, + "start": Object { + "column": 33, + "line": 4, + }, + }, + "range": Array [ + 110, + 111, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 37, + "line": 4, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 125, + 126, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/conditional-infer-simple.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 63, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 37, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "range": Array [ + 35, + 36, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 48, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 48, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + }, + "range": Array [ + 47, + 48, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + ], + "range": Array [ + 24, + 50, + ], + "type": "TSTypeLiteral", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 62, + ], + "type": "TSNeverKeyword", + }, + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 62, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 9, + 10, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 8, + 11, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 64, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "Keyword", + "value": "extends", + }, + 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": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 34, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 46, + ], + "type": "Identifier", + "value": "infer", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "U", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 62, + ], + "type": "Identifier", + "value": "never", + }, + Object { + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/conditional-with-null.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "TSNullKeyword", + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 45, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + "type": "TSConditionalType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 45, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 46, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "Keyword", + "value": "null", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 42, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 42, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 23, + 33, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 33, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 42, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 42, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSConstructorType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 42, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 15, + 19, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 7, + 25, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSConstructorType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "a", + }, + 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": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-in-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 30, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 30, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 30, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 29, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSConstructorType", + }, + ], + "range": Array [ + 12, + 30, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-with-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 35, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 26, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 26, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "TSNumberKeyword", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 26, + ], + "type": "TSArrayType", + }, + }, + }, + ], + "range": Array [ + 7, + 35, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSConstructorType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 35, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "a", + }, + 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": "Identifier", + "value": "number", + }, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 8, + 17, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 19, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 38, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 38, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 38, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 38, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 21, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 15, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 7, + 21, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSFunctionType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 9, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 7, + 10, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-in-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 24, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 24, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 24, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 23, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + ], + "range": Array [ + 12, + 24, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 24, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-with-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 31, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 22, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 22, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "TSNumberKeyword", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 22, + ], + "type": "TSArrayType", + }, + }, + }, + ], + "range": Array [ + 7, + 31, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 31, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-with-this.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "this", + "range": Array [ + 8, + 20, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 29, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 29, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 29, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 29, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 16, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 35, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 37, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature-readonly.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "key", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 46, + ], + "readonly": true, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 48, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + "value": "key", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature-without-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 16, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 27, + ], + "type": "TSIndexSignature", + "typeAnnotation": null, + }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/indexed.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 11, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "indexType": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "K", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "objectType": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + "range": Array [ + 7, + 11, + ], + "type": "TSIndexedAccessType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 11, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "K", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/intersection-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "LinkedList", + "range": Array [ + 5, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 49, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 48, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "next", + "range": Array [ + 27, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 46, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 46, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "LinkedList", + "range": Array [ + 33, + 43, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 43, + 46, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + ], + "range": Array [ + 25, + 48, + ], + "type": "TSTypeLiteral", + }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "range": Array [ + 16, + 17, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 15, + 18, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 15, + ], + "type": "Identifier", + "value": "LinkedList", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Identifier", + "value": "next", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 43, + ], + "type": "Identifier", + "value": "LinkedList", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/literal-number.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 8, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "TSLiteralType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 8, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/literal-number-negative.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 9, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 9, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "literal": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "operator": "-", + "prefix": true, + "range": Array [ + 7, + 9, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "TSLiteralType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/literal-string.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 12, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 12, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "TSLiteralType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "range": Array [ + 4, + 35, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 35, + ], + "type": "TSMappedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "TSNumberKeyword", + }, + "typeParameter": Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 23, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "range": Array [ + 12, + 23, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 35, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 23, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "]", + }, + 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": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "range": Array [ + 4, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "optional": true, + "range": Array [ + 9, + 45, + ], + "readonly": true, + "type": "TSMappedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "TSNumberKeyword", + }, + "typeParameter": Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 32, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 45, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 46, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-minus.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "range": Array [ + 4, + 46, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "optional": "-", + "range": Array [ + 9, + 46, + ], + "readonly": "-", + "type": "TSMappedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSNumberKeyword", + }, + "typeParameter": Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "range": Array [ + 22, + 33, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 46, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-plus.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "range": Array [ + 4, + 47, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "optional": "+", + "range": Array [ + 9, + 47, + ], + "readonly": "+", + "type": "TSMappedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSNumberKeyword", + }, + "typeParameter": Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "range": Array [ + 22, + 33, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/nested-types.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 80, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 80, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "TSStringKeyword", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "TSBooleanKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 38, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 80, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 42, + 44, + ], + "type": "TSTypeLiteral", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 74, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 54, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSNumberKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 55, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 74, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "TSNullKeyword", + }, + Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 72, + ], + "type": "TSBooleanKeyword", + }, + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 74, + ], + "type": "TSArrayType", + }, + ], + }, + ], + }, + ], + "loc": Object { + "end": Object { + "column": 75, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 75, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 78, + 80, + ], + "type": "TSTypeLiteral", + }, + ], + }, + ], + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 81, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "Keyword", + "value": "null", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 72, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 1, + }, + "start": Object { + "column": 72, + "line": 1, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 73, + "line": 1, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 75, + "line": 1, + }, + "start": Object { + "column": 74, + "line": 1, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 76, + "line": 1, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 79, + "line": 1, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/parenthesized-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 28, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 27, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "TSNumberKeyword", + }, + ], + }, + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ")", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 8, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 8, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 20, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 20, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 20, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 19, + ], + "type": "TSNumberKeyword", + }, + ], + "range": Array [ + 12, + 20, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 20, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference-generic-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 27, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 27, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 27, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 26, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 13, + 18, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSNumberKeyword", + }, + ], + "range": Array [ + 18, + 26, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + ], + "range": Array [ + 12, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 27, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/this-type.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "clone", + "range": Array [ + 18, + 23, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 54, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 45, + 49, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 38, + 50, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 23, + 54, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "TSThisType", + }, + }, + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 56, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Message", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + "value": "Message", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 23, + ], + "type": "Identifier", + "value": "clone", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 45, + 49, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/this-type-expanded.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 29, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSNumberKeyword", + }, + }, + "value": null, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "method", + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 33, + 91, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 80, + 84, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "a", + "range": Array [ + 85, + 86, + ], + "type": "Identifier", + }, + "range": Array [ + 80, + 86, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 73, + 87, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 36, + "line": 4, + }, + }, + "range": Array [ + 67, + 91, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "this", + "range": Array [ + 47, + 57, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ + 51, + 57, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 22, + "line": 4, + }, + }, + "range": Array [ + 53, + 57, + ], + "type": "TSThisType", + }, + }, + }, + ], + "range": Array [ + 46, + 91, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 58, + 66, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 60, + 66, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "name": "method2", + "range": Array [ + 102, + 109, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 95, + 149, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "range": Array [ + 138, + 142, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "name": "a", + "range": Array [ + 143, + 144, + ], + "type": "Identifier", + }, + "range": Array [ + 138, + 144, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, + }, + }, + "range": Array [ + 131, + 145, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 32, + "line": 8, + }, + }, + "range": Array [ + 125, + 149, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 16, + "line": 8, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 17, + "line": 8, + }, + }, + "name": "this", + "range": Array [ + 110, + 117, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 21, + "line": 8, + }, + }, + "range": Array [ + 114, + 117, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 23, + "line": 8, + }, + }, + "range": Array [ + 116, + 117, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 23, + "line": 8, + }, + }, + "name": "A", + "range": Array [ + 116, + 117, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 109, + 149, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 8, + }, + "start": Object { + "column": 25, + "line": 8, + }, + }, + "range": Array [ + 118, + 124, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 8, + }, + "start": Object { + "column": 27, + "line": 8, + }, + }, + "range": Array [ + 120, + 124, + ], + "type": "TSThisType", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 12, + }, + "start": Object { + "column": 9, + "line": 12, + }, + }, + "name": "method3", + "range": Array [ + 160, + 167, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 2, + "line": 12, + }, + }, + "range": Array [ + 153, + 237, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "name": "fn", + "range": Array [ + 198, + 200, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 19, + "line": 13, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 13, + }, + "start": Object { + "column": 19, + "line": 13, + }, + }, + "range": Array [ + 209, + 213, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 24, + "line": 13, + }, + }, + "name": "a", + "range": Array [ + 214, + 215, + ], + "type": "Identifier", + }, + "range": Array [ + 209, + 215, + ], + "type": "MemberExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 13, + "line": 13, + }, + }, + "params": Array [], + "range": Array [ + 203, + 215, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "range": Array [ + 198, + 215, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, + }, + "range": Array [ + 194, + 216, + ], + "type": "VariableDeclaration", + }, + Object { + "argument": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 14, + }, + "start": Object { + "column": 11, + "line": 14, + }, + }, + "name": "fn", + "range": Array [ + 228, + 230, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 14, + }, + "start": Object { + "column": 11, + "line": 14, + }, + }, + "range": Array [ + 228, + 232, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 14, + }, + "start": Object { + "column": 4, + "line": 14, + }, + }, + "range": Array [ + 221, + 233, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 37, + "line": 12, + }, + }, + "range": Array [ + 188, + 237, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 16, + "line": 12, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 12, + }, + "start": Object { + "column": 17, + "line": 12, + }, + }, + "name": "this", + "range": Array [ + 168, + 178, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 12, + }, + "start": Object { + "column": 21, + "line": 12, + }, + }, + "range": Array [ + 172, + 178, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 12, + }, + "start": Object { + "column": 23, + "line": 12, + }, + }, + "range": Array [ + 174, + 178, + ], + "type": "TSThisType", + }, + }, + }, + ], + "range": Array [ + 167, + 237, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 12, + }, + "start": Object { + "column": 28, + "line": 12, + }, + }, + "range": Array [ + 179, + 187, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 12, + }, + "start": Object { + "column": 30, + "line": 12, + }, + }, + "range": Array [ + 181, + 187, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 17, + }, + "start": Object { + "column": 9, + "line": 17, + }, + }, + "name": "method4", + "range": Array [ + 248, + 255, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 2, + "line": 17, + }, + }, + "range": Array [ + 241, + 322, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 18, + }, + "start": Object { + "column": 8, + "line": 18, + }, + }, + "name": "fn", + "range": Array [ + 283, + 285, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 19, + "line": 18, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 18, + }, + "start": Object { + "column": 19, + "line": 18, + }, + }, + "range": Array [ + 294, + 298, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 24, + "line": 18, + }, + }, + "name": "a", + "range": Array [ + 299, + 300, + ], + "type": "Identifier", + }, + "range": Array [ + 294, + 300, + ], + "type": "MemberExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 13, + "line": 18, + }, + }, + "params": Array [], + "range": Array [ + 288, + 300, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 8, + "line": 18, + }, + }, + "range": Array [ + 283, + 300, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 26, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 18, + }, + }, + "range": Array [ + 279, + 301, + ], + "type": "VariableDeclaration", + }, + Object { + "argument": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 19, + }, + "start": Object { + "column": 11, + "line": 19, + }, + }, + "name": "fn", + "range": Array [ + 313, + 315, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 19, + }, + "start": Object { + "column": 11, + "line": 19, + }, + }, + "range": Array [ + 313, + 317, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 19, + }, + "start": Object { + "column": 4, + "line": 19, + }, + }, + "range": Array [ + 306, + 318, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 34, + "line": 17, + }, + }, + "range": Array [ + 273, + 322, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 16, + "line": 17, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 17, + "line": 17, + }, + }, + "name": "this", + "range": Array [ + 256, + 263, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 21, + "line": 17, + }, + }, + "range": Array [ + 260, + 263, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 23, + "line": 17, + }, + }, + "range": Array [ + 262, + 263, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 23, + "line": 17, + }, + }, + "name": "A", + "range": Array [ + 262, + 263, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 255, + 322, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 17, + }, + "start": Object { + "column": 25, + "line": 17, + }, + }, + "range": Array [ + 264, + 272, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 17, + }, + "start": Object { + "column": 27, + "line": 17, + }, + }, + "range": Array [ + 266, + 272, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 22, + }, + "start": Object { + "column": 9, + "line": 22, + }, + }, + "name": "staticMethod", + "range": Array [ + 333, + 345, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 2, + "line": 22, + }, + }, + "range": Array [ + 326, + 387, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 23, + }, + "start": Object { + "column": 11, + "line": 23, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 23, + }, + "start": Object { + "column": 11, + "line": 23, + }, + }, + "range": Array [ + 376, + 380, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 23, + }, + "start": Object { + "column": 16, + "line": 23, + }, + }, + "name": "a", + "range": Array [ + 381, + 382, + ], + "type": "Identifier", + }, + "range": Array [ + 376, + 382, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 23, + }, + "start": Object { + "column": 4, + "line": 23, + }, + }, + "range": Array [ + 369, + 383, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 39, + "line": 22, + }, + }, + "range": Array [ + 363, + 387, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 21, + "line": 22, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 22, + "line": 22, + }, + }, + "name": "this", + "range": Array [ + 346, + 353, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 26, + "line": 22, + }, + }, + "range": Array [ + 350, + 353, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 28, + "line": 22, + }, + }, + "range": Array [ + 352, + 353, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 28, + "line": 22, + }, + }, + "name": "A", + "range": Array [ + 352, + 353, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 345, + 387, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 22, + }, + "start": Object { + "column": 30, + "line": 22, + }, + }, + "range": Array [ + 354, + 362, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 22, + }, + "start": Object { + "column": 32, + "line": 22, + }, + }, + "range": Array [ + 356, + 362, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 26, + }, + "start": Object { + "column": 9, + "line": 26, + }, + }, + "name": "typeof", + "range": Array [ + 398, + 404, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 28, + }, + "start": Object { + "column": 2, + "line": 26, + }, + }, + "range": Array [ + 391, + 449, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 27, + }, + "start": Object { + "column": 18, + "line": 27, + }, + }, + "range": Array [ + 440, + 444, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 27, + }, + "start": Object { + "column": 11, + "line": 27, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 433, + 444, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 27, + }, + "start": Object { + "column": 4, + "line": 27, + }, + }, + "range": Array [ + 426, + 445, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 28, + }, + "start": Object { + "column": 31, + "line": 26, + }, + }, + "range": Array [ + 420, + 449, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 28, + }, + "start": Object { + "column": 15, + "line": 26, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 16, + "line": 26, + }, + }, + "name": "this", + "range": Array [ + 405, + 412, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 20, + "line": 26, + }, + }, + "range": Array [ + 409, + 412, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 22, + "line": 26, + }, + }, + "range": Array [ + 411, + 412, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 22, + "line": 26, + }, + }, + "name": "A", + "range": Array [ + 411, + 412, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 404, + 449, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 26, + }, + "start": Object { + "column": 24, + "line": 26, + }, + }, + "range": Array [ + 413, + 419, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 26, + }, + "start": Object { + "column": 26, + "line": 26, + }, + }, + "range": Array [ + 415, + 419, + ], + "type": "TSThisType", + }, + }, + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 29, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "range": Array [ + 8, + 451, + ], + "type": "ClassBody", }, - "range": Array [ - 224, - 225, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 11, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "range": Array [ - 225, - 228, - ], - "type": "Identifier", - "value": "baz", - }, - Object { "loc": Object { "end": Object { - "column": 17, - "line": 11, + "column": 1, + "line": 29, }, "start": Object { - "column": 16, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 228, - 229, + 0, + 451, ], - "type": "Punctuator", - "value": ":", + "superClass": null, + "type": "ClassDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "Identifier", - "value": "string", + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 30, }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 24, - "line": 11, - }, - }, - "range": Array [ - 236, - 237, - ], - "type": "Punctuator", - "value": "]", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 452, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 26, - "line": 11, + "column": 5, + "line": 1, }, "start": Object { - "column": 25, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 237, - 238, + 0, + 5, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 11, + "column": 7, + "line": 1, }, "start": Object { - "column": 27, - "line": 11, + "column": 6, + "line": 1, }, }, "range": Array [ - 239, - 245, + 6, + 7, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 11, + "column": 9, + "line": 1, }, "start": Object { - "column": 33, - "line": 11, + "column": 8, + "line": 1, }, }, "range": Array [ - 245, - 246, + 8, + 9, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 12, + "column": 8, + "line": 2, }, "start": Object { - "column": 4, - "line": 12, + "column": 2, + "line": 2, }, }, "range": Array [ - 251, - 260, + 12, + 18, ], "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 14, - "line": 12, - }, - }, - "range": Array [ - 261, - 262, - ], - "type": "Punctuator", - "value": "[", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 12, + "column": 10, + "line": 2, }, "start": Object { - "column": 15, - "line": 12, + "column": 9, + "line": 2, }, }, "range": Array [ - 262, - 265, + 19, + 20, ], "type": "Identifier", - "value": "baz", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 12, + "column": 11, + "line": 2, }, "start": Object { - "column": 18, - "line": 12, + "column": 10, + "line": 2, }, }, "range": Array [ - 265, - 266, + 20, + 21, ], "type": "Punctuator", "value": ":", @@ -63568,161 +117827,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 12, + "column": 18, + "line": 2, }, "start": Object { - "column": 20, - "line": 12, + "column": 12, + "line": 2, }, }, "range": Array [ - 267, - 273, + 22, + 28, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 12, + "column": 19, + "line": 2, }, "start": Object { - "column": 26, - "line": 12, + "column": 18, + "line": 2, }, }, "range": Array [ - 273, - 274, + 28, + 29, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 12, + "column": 8, + "line": 4, }, "start": Object { - "column": 27, - "line": 12, + "column": 2, + "line": 4, }, }, "range": Array [ - 274, - 275, + 33, + 39, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 12, + "column": 15, + "line": 4, }, "start": Object { - "column": 29, - "line": 12, + "column": 9, + "line": 4, }, }, "range": Array [ - 276, - 282, + 40, + 46, ], "type": "Identifier", - "value": "string", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 12, + "column": 16, + "line": 4, }, "start": Object { - "column": 35, - "line": 12, + "column": 15, + "line": 4, }, }, "range": Array [ - 282, - 283, + 46, + 47, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 13, + "column": 20, + "line": 4, }, "start": Object { - "column": 4, - "line": 13, + "column": 16, + "line": 4, }, }, "range": Array [ - 288, - 294, + 47, + 51, ], "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 13, - }, - "start": Object { - "column": 11, - "line": 13, - }, - }, - "range": Array [ - 295, - 296, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "range": Array [ - 296, - 299, - ], - "type": "Identifier", - "value": "baz", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 13, + "column": 21, + "line": 4, }, "start": Object { - "column": 15, - "line": 13, + "column": 20, + "line": 4, }, }, "range": Array [ - 299, - 300, + 51, + 52, ], "type": "Punctuator", "value": ":", @@ -63730,53 +117953,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 13, + "column": 26, + "line": 4, }, "start": Object { - "column": 17, - "line": 13, + "column": 22, + "line": 4, }, }, "range": Array [ - 301, - 307, + 53, + 57, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 13, + "column": 27, + "line": 4, }, "start": Object { - "column": 23, - "line": 13, + "column": 26, + "line": 4, }, }, "range": Array [ - 307, - 308, + 57, + 58, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 13, + "column": 28, + "line": 4, }, "start": Object { - "column": 24, - "line": 13, + "column": 27, + "line": 4, }, }, "range": Array [ - 308, - 309, + 58, + 59, ], "type": "Punctuator", "value": ":", @@ -63784,269 +118007,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, - "line": 13, + "column": 35, + "line": 4, }, "start": Object { - "column": 26, - "line": 13, + "column": 29, + "line": 4, }, }, "range": Array [ - 310, - 316, + 60, + 66, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 13, + "column": 37, + "line": 4, }, "start": Object { - "column": 32, - "line": 13, + "column": 36, + "line": 4, }, }, "range": Array [ - 316, - 317, + 67, + 68, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 14, + "line": 5, }, "start": Object { "column": 4, - "line": 14, + "line": 5, }, }, "range": Array [ - 322, - 328, + 73, + 79, ], "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 14, - }, - "start": Object { - "column": 11, - "line": 14, - }, - }, - "range": Array [ - 329, - 330, - ], - "type": "Punctuator", - "value": "[", + "value": "return", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 14, + "line": 5, }, "start": Object { - "column": 12, - "line": 14, + "column": 11, + "line": 5, }, }, "range": Array [ - 330, - 333, + 80, + 84, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 14, + "line": 5, }, "start": Object { "column": 15, - "line": 14, + "line": 5, }, }, "range": Array [ - 333, - 334, + 84, + 85, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 335, - 341, - ], - "type": "Identifier", - "value": "string", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 14, + "column": 17, + "line": 5, }, "start": Object { - "column": 23, - "line": 14, + "column": 16, + "line": 5, }, }, "range": Array [ - 341, - 342, + 85, + 86, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 14, + "column": 18, + "line": 5, }, "start": Object { - "column": 24, - "line": 14, + "column": 17, + "line": 5, }, }, "range": Array [ - 342, - 343, + 86, + 87, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 14, + "column": 3, + "line": 6, }, "start": Object { - "column": 26, - "line": 14, + "column": 2, + "line": 6, }, }, "range": Array [ - 344, - 350, + 90, + 91, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 14, + "column": 8, + "line": 8, }, "start": Object { - "column": 32, - "line": 14, + "column": 2, + "line": 8, }, }, "range": Array [ - 350, - 351, + 95, + 101, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 15, + "column": 16, + "line": 8, }, "start": Object { - "column": 4, - "line": 15, + "column": 9, + "line": 8, }, }, "range": Array [ - 356, - 364, + 102, + 109, ], "type": "Identifier", - "value": "readonly", + "value": "method2", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 15, + "column": 17, + "line": 8, }, "start": Object { - "column": 13, - "line": 15, + "column": 16, + "line": 8, }, }, "range": Array [ - 365, - 366, + 109, + 110, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 15, + "column": 21, + "line": 8, }, "start": Object { - "column": 14, - "line": 15, + "column": 17, + "line": 8, }, }, "range": Array [ - 366, - 369, + 110, + 114, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 15, + "column": 22, + "line": 8, }, "start": Object { - "column": 17, - "line": 15, + "column": 21, + "line": 8, }, }, "range": Array [ - 369, - 370, + 114, + 115, ], "type": "Punctuator", "value": ":", @@ -64054,53 +118241,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 15, + "column": 24, + "line": 8, }, "start": Object { - "column": 19, - "line": 15, + "column": 23, + "line": 8, }, }, "range": Array [ - 371, - 377, + 116, + 117, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 15, + "column": 25, + "line": 8, }, "start": Object { - "column": 25, - "line": 15, + "column": 24, + "line": 8, }, }, "range": Array [ - 377, - 378, + 117, + 118, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 15, + "column": 26, + "line": 8, }, "start": Object { - "column": 26, - "line": 15, + "column": 25, + "line": 8, }, }, "range": Array [ - 378, - 379, + 118, + 119, ], "type": "Punctuator", "value": ":", @@ -64108,629 +118295,665 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, - "line": 15, + "column": 31, + "line": 8, }, "start": Object { - "column": 28, - "line": 15, + "column": 27, + "line": 8, }, }, "range": Array [ - 380, - 386, + 120, + 124, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 15, + "column": 33, + "line": 8, }, "start": Object { - "column": 34, - "line": 15, + "column": 32, + "line": 8, }, }, "range": Array [ - 386, - 387, + 125, + 126, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 17, + "line": 9, }, "start": Object { "column": 4, - "line": 17, + "line": 9, }, }, "range": Array [ - 393, - 399, + 131, + 137, ], "type": "Keyword", - "value": "public", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 17, + "column": 15, + "line": 9, }, "start": Object { "column": 11, - "line": 17, + "line": 9, }, }, "range": Array [ - 400, - 401, + 138, + 142, ], - "type": "Identifier", - "value": "g", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 17, + "column": 16, + "line": 9, }, "start": Object { - "column": 12, - "line": 17, + "column": 15, + "line": 9, }, }, "range": Array [ - 401, - 402, + 142, + 143, ], "type": "Punctuator", - "value": "(", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 17, + "column": 17, + "line": 9, }, "start": Object { - "column": 13, - "line": 17, + "column": 16, + "line": 9, }, }, "range": Array [ - 402, - 405, + 143, + 144, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { "column": 17, - "line": 17, + "line": 9, + }, + }, + "range": Array [ + 144, + 145, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 10, }, "start": Object { - "column": 16, - "line": 17, + "column": 2, + "line": 10, }, }, "range": Array [ - 405, - 406, + 148, + 149, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 17, + "column": 8, + "line": 12, }, "start": Object { - "column": 18, - "line": 17, + "column": 2, + "line": 12, }, }, "range": Array [ - 407, - 413, + 153, + 159, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 17, + "column": 16, + "line": 12, }, "start": Object { - "column": 24, - "line": 17, + "column": 9, + "line": 12, }, }, "range": Array [ - 413, - 414, + 160, + 167, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "method3", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 17, + "column": 17, + "line": 12, }, "start": Object { - "column": 25, - "line": 17, + "column": 16, + "line": 12, }, }, "range": Array [ - 414, - 415, + 167, + 168, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 17, + "column": 21, + "line": 12, }, "start": Object { - "column": 27, - "line": 17, + "column": 17, + "line": 12, }, }, "range": Array [ - 416, - 420, + 168, + 172, ], "type": "Keyword", - "value": "void", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 17, + "column": 22, + "line": 12, }, "start": Object { - "column": 31, - "line": 17, + "column": 21, + "line": 12, }, }, "range": Array [ - 420, - 421, + 172, + 173, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 18, + "column": 27, + "line": 12, }, "start": Object { - "column": 4, - "line": 18, + "column": 23, + "line": 12, }, }, "range": Array [ - 426, - 433, + 174, + 178, ], "type": "Keyword", - "value": "private", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 18, + "column": 28, + "line": 12, }, "start": Object { - "column": 12, - "line": 18, + "column": 27, + "line": 12, }, }, "range": Array [ - 434, - 435, + 178, + 179, ], - "type": "Identifier", - "value": "h", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 18, + "column": 29, + "line": 12, }, "start": Object { - "column": 13, - "line": 18, + "column": 28, + "line": 12, }, }, "range": Array [ - 435, - 436, + 179, + 180, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 18, + "column": 36, + "line": 12, }, "start": Object { - "column": 14, - "line": 18, + "column": 30, + "line": 12, }, }, "range": Array [ - 436, - 439, + 181, + 187, ], "type": "Identifier", - "value": "bar", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 18, + "column": 38, + "line": 12, }, "start": Object { - "column": 17, - "line": 18, + "column": 37, + "line": 12, }, }, "range": Array [ - 439, - 440, + 188, + 189, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 18, + "column": 7, + "line": 13, }, "start": Object { - "column": 19, - "line": 18, + "column": 4, + "line": 13, + }, + }, + "range": Array [ + 194, + 197, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, }, }, "range": Array [ - 441, - 447, + 198, + 200, ], "type": "Identifier", - "value": "string", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 18, + "column": 12, + "line": 13, }, "start": Object { - "column": 25, - "line": 18, + "column": 11, + "line": 13, }, }, "range": Array [ - 447, - 448, + 201, + 202, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 18, + "column": 14, + "line": 13, }, "start": Object { - "column": 26, - "line": 18, + "column": 13, + "line": 13, }, }, "range": Array [ - 448, - 449, + 203, + 204, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 18, + "column": 15, + "line": 13, }, "start": Object { - "column": 28, - "line": 18, + "column": 14, + "line": 13, }, }, "range": Array [ - 450, - 454, + 204, + 205, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 18, + "column": 18, + "line": 13, }, "start": Object { - "column": 32, - "line": 18, + "column": 16, + "line": 13, }, }, "range": Array [ - 454, - 455, + 206, + 208, ], "type": "Punctuator", - "value": ";", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 19, + "column": 23, + "line": 13, }, "start": Object { - "column": 4, - "line": 19, + "column": 19, + "line": 13, }, }, "range": Array [ - 460, - 469, + 209, + 213, ], "type": "Keyword", - "value": "protected", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 19, + "column": 24, + "line": 13, }, "start": Object { - "column": 14, - "line": 19, + "column": 23, + "line": 13, }, }, "range": Array [ - 470, - 471, + 213, + 214, ], - "type": "Identifier", - "value": "i", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 19, + "column": 25, + "line": 13, }, "start": Object { - "column": 15, - "line": 19, + "column": 24, + "line": 13, }, }, "range": Array [ - 471, - 472, + 214, + 215, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 19, + "column": 26, + "line": 13, }, "start": Object { - "column": 16, - "line": 19, + "column": 25, + "line": 13, }, }, "range": Array [ - 472, - 475, + 215, + 216, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 19, + "column": 10, + "line": 14, }, "start": Object { - "column": 19, - "line": 19, + "column": 4, + "line": 14, }, }, "range": Array [ - 475, - 476, + 221, + 227, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 19, + "column": 13, + "line": 14, }, "start": Object { - "column": 21, - "line": 19, + "column": 11, + "line": 14, }, }, "range": Array [ - 477, - 483, + 228, + 230, ], "type": "Identifier", - "value": "string", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 19, + "column": 14, + "line": 14, }, "start": Object { - "column": 27, - "line": 19, + "column": 13, + "line": 14, }, }, "range": Array [ - 483, - 484, + 230, + 231, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 19, + "column": 15, + "line": 14, }, "start": Object { - "column": 28, - "line": 19, + "column": 14, + "line": 14, }, }, "range": Array [ - 484, - 485, + 231, + 232, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 19, + "column": 16, + "line": 14, }, "start": Object { - "column": 30, - "line": 19, + "column": 15, + "line": 14, }, }, "range": Array [ - 486, - 490, + 232, + 233, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 19, + "column": 3, + "line": 15, }, "start": Object { - "column": 34, - "line": 19, + "column": 2, + "line": 15, }, }, "range": Array [ - 490, - 491, + 236, + 237, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 20, + "column": 8, + "line": 17, }, "start": Object { - "column": 4, - "line": 20, + "column": 2, + "line": 17, }, }, "range": Array [ - 496, - 502, + 241, + 247, ], "type": "Keyword", - "value": "static", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 20, + "column": 16, + "line": 17, }, "start": Object { - "column": 11, - "line": 20, + "column": 9, + "line": 17, }, }, "range": Array [ - 503, - 504, + 248, + 255, ], "type": "Identifier", - "value": "j", + "value": "method4", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 20, + "column": 17, + "line": 17, }, "start": Object { - "column": 12, - "line": 20, + "column": 16, + "line": 17, }, }, "range": Array [ - 504, - 505, + 255, + 256, ], "type": "Punctuator", "value": "(", @@ -64738,35 +118961,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 20, + "column": 21, + "line": 17, }, "start": Object { - "column": 13, - "line": 20, + "column": 17, + "line": 17, }, }, "range": Array [ - 505, - 508, + 256, + 260, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 20, + "column": 22, + "line": 17, }, "start": Object { - "column": 16, - "line": 20, + "column": 21, + "line": 17, }, }, "range": Array [ - 508, - 509, + 260, + 261, ], "type": "Punctuator", "value": ":", @@ -64775,34 +118998,34 @@ Object { "loc": Object { "end": Object { "column": 24, - "line": 20, + "line": 17, }, "start": Object { - "column": 18, - "line": 20, + "column": 23, + "line": 17, }, }, "range": Array [ - 510, - 516, + 262, + 263, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 20, + "line": 17, }, "start": Object { "column": 24, - "line": 20, + "line": 17, }, }, "range": Array [ - 516, - 517, + 263, + 264, ], "type": "Punctuator", "value": ")", @@ -64811,16 +119034,16 @@ Object { "loc": Object { "end": Object { "column": 26, - "line": 20, + "line": 17, }, "start": Object { "column": 25, - "line": 20, + "line": 17, }, }, "range": Array [ - 517, - 518, + 264, + 265, ], "type": "Punctuator", "value": ":", @@ -64828,89 +119051,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 20, + "column": 33, + "line": 17, }, "start": Object { "column": 27, - "line": 20, + "line": 17, }, }, "range": Array [ - 519, - 523, + 266, + 272, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 20, + "column": 35, + "line": 17, }, "start": Object { - "column": 31, - "line": 20, + "column": 34, + "line": 17, }, }, "range": Array [ - 523, - 524, + 273, + 274, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 21, + "column": 7, + "line": 18, }, "start": Object { "column": 4, - "line": 21, + "line": 18, }, }, "range": Array [ - 529, - 535, + 279, + 282, ], "type": "Keyword", - "value": "export", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 18, + }, + "start": Object { + "column": 8, + "line": 18, + }, + }, + "range": Array [ + 283, + 285, + ], + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 21, + "line": 18, }, "start": Object { "column": 11, - "line": 21, + "line": 18, }, }, "range": Array [ - 536, - 537, + 286, + 287, ], - "type": "Identifier", - "value": "k", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 21, + "column": 14, + "line": 18, }, "start": Object { - "column": 12, - "line": 21, + "column": 13, + "line": 18, }, }, "range": Array [ - 537, - 538, + 288, + 289, ], "type": "Punctuator", "value": "(", @@ -64918,218 +119159,272 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 21, + "column": 15, + "line": 18, }, "start": Object { - "column": 13, - "line": 21, + "column": 14, + "line": 18, }, }, "range": Array [ - 538, - 541, + 289, + 290, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 21, + "column": 18, + "line": 18, }, "start": Object { "column": 16, - "line": 21, + "line": 18, }, }, "range": Array [ - 541, - 542, + 291, + 293, ], "type": "Punctuator", - "value": ":", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 18, + }, + "start": Object { + "column": 19, + "line": 18, + }, + }, + "range": Array [ + 294, + 298, + ], + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 21, + "line": 18, }, "start": Object { - "column": 18, - "line": 21, + "column": 23, + "line": 18, }, }, "range": Array [ - 543, - 549, + 298, + 299, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 21, + "line": 18, }, "start": Object { "column": 24, - "line": 21, + "line": 18, }, }, "range": Array [ - 549, - 550, + 299, + 300, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 26, - "line": 21, + "line": 18, }, "start": Object { "column": 25, - "line": 21, + "line": 18, }, }, "range": Array [ - 550, - 551, + 300, + 301, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 21, + "column": 10, + "line": 19, }, "start": Object { - "column": 27, - "line": 21, + "column": 4, + "line": 19, }, }, "range": Array [ - 552, - 556, + 306, + 312, ], "type": "Keyword", - "value": "void", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 21, + "column": 13, + "line": 19, }, "start": Object { - "column": 31, - "line": 21, + "column": 11, + "line": 19, }, }, "range": Array [ - 556, - 557, + 313, + 315, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 22, + "column": 14, + "line": 19, }, "start": Object { - "column": 4, - "line": 22, + "column": 13, + "line": 19, }, }, "range": Array [ - 562, - 570, + 315, + 316, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 22, + "column": 15, + "line": 19, }, "start": Object { - "column": 13, - "line": 22, + "column": 14, + "line": 19, }, }, "range": Array [ - 571, - 572, + 316, + 317, ], - "type": "Identifier", - "value": "l", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { + "column": 16, + "line": 19, + }, + "start": Object { "column": 15, + "line": 19, + }, + }, + "range": Array [ + 317, + 318, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 2, + "line": 20, + }, + }, + "range": Array [ + 321, + 322, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, "line": 22, }, "start": Object { - "column": 14, + "column": 2, "line": 22, }, }, "range": Array [ - 572, - 573, + 326, + 332, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 22, }, "start": Object { - "column": 15, + "column": 9, "line": 22, }, }, "range": Array [ - 573, - 576, + 333, + 345, ], "type": "Identifier", - "value": "bar", + "value": "staticMethod", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 22, }, "start": Object { - "column": 18, + "column": 21, "line": 22, }, }, "range": Array [ - 576, - 577, + 345, + 346, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { @@ -65138,16 +119433,16 @@ Object { "line": 22, }, "start": Object { - "column": 20, + "column": 22, "line": 22, }, }, "range": Array [ - 578, - 584, + 346, + 350, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { @@ -65161,34 +119456,34 @@ Object { }, }, "range": Array [ - 584, - 585, + 350, + 351, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 29, "line": 22, }, "start": Object { - "column": 27, + "column": 28, "line": 22, }, }, "range": Array [ - 585, - 586, + 352, + 353, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 30, "line": 22, }, "start": Object { @@ -65197,374 +119492,296 @@ Object { }, }, "range": Array [ - 587, - 591, + 353, + 354, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 31, "line": 22, }, "start": Object { - "column": 33, + "column": 30, "line": 22, }, }, "range": Array [ - 591, - 592, + 354, + 355, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 23, + "column": 38, + "line": 22, }, "start": Object { - "column": 0, - "line": 23, + "column": 32, + "line": 22, }, }, "range": Array [ - 593, - 594, + 356, + 362, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "number", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/expressions/call-expression-type-arguments.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 0, - 3, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 40, + "line": 22, }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 39, + "line": 22, }, - "range": Array [ - 0, - 8, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 3, - 6, - ], - "type": "TSTypeParameterInstantiation", + }, + "range": Array [ + 363, + 364, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 23, + }, + "start": Object { + "column": 4, + "line": 23, }, }, + "range": Array [ + 369, + 375, + ], + "type": "Keyword", + "value": "return", + }, + Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 23, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 23, }, }, "range": Array [ - 0, - 9, + 376, + 380, ], - "type": "ExpressionStatement", + "type": "Keyword", + "value": "this", }, Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 16, + "line": 23, }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, + "start": Object { + "column": 15, + "line": 23, }, - "range": Array [ - 10, - 23, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 13, - 21, - ], - "type": "TSTypeParameterInstantiation", + }, + "range": Array [ + 380, + 381, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 23, + }, + "start": Object { + "column": 16, + "line": 23, }, }, + "range": Array [ + 381, + 382, + ], + "type": "Identifier", + "value": "a", + }, + Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 18, + "line": 23, }, "start": Object { - "column": 0, - "line": 2, + "column": 17, + "line": 23, }, }, "range": Array [ - 10, - 24, + 382, + 383, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ";", }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 2, + "line": 24, + }, + }, + "range": Array [ + 386, + 387, + ], + "type": "Punctuator", + "value": "}", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 26, + }, + "start": Object { + "column": 2, + "line": 26, + }, + }, + "range": Array [ + 391, + 397, + ], + "type": "Keyword", + "value": "static", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 15, + "line": 26, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 26, }, }, "range": Array [ - 0, - 3, + 398, + 404, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 16, + "line": 26, }, "start": Object { - "column": 3, - "line": 1, + "column": 15, + "line": 26, }, }, "range": Array [ - 3, - 4, + 404, + 405, ], "type": "Punctuator", - "value": "<", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 26, }, "start": Object { - "column": 4, - "line": 1, + "column": 16, + "line": 26, }, }, "range": Array [ - 4, - 5, + 405, + 409, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 21, + "line": 26, }, "start": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 26, }, }, "range": Array [ - 5, - 6, + 409, + 410, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 23, + "line": 26, }, "start": Object { - "column": 6, - "line": 1, + "column": 22, + "line": 26, }, }, "range": Array [ - 6, - 7, + 411, + 412, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 24, + "line": 26, }, "start": Object { - "column": 7, - "line": 1, + "column": 23, + "line": 26, }, }, "range": Array [ - 7, - 8, + 412, + 413, ], "type": "Punctuator", "value": ")", @@ -65572,153 +119789,171 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 25, + "line": 26, }, "start": Object { - "column": 8, - "line": 1, + "column": 24, + "line": 26, }, }, "range": Array [ - 8, - 9, + 413, + 414, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 30, + "line": 26, }, "start": Object { - "column": 0, - "line": 2, + "column": 26, + "line": 26, }, }, "range": Array [ - 10, - 13, + 415, + 419, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 2, + "column": 32, + "line": 26, }, "start": Object { - "column": 3, - "line": 2, + "column": 31, + "line": 26, }, }, "range": Array [ - 13, - 14, + 420, + 421, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 2, + "line": 27, }, "start": Object { "column": 4, - "line": 2, + "line": 27, }, }, "range": Array [ - 14, - 20, + 426, + 432, ], - "type": "Identifier", - "value": "number", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { + "column": 17, + "line": 27, + }, + "start": Object { "column": 11, - "line": 2, + "line": 27, + }, + }, + "range": Array [ + 433, + 439, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 27, }, "start": Object { - "column": 10, - "line": 2, + "column": 18, + "line": 27, }, }, "range": Array [ - 20, - 21, + 440, + 444, ], - "type": "Punctuator", - "value": ">", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 23, + "line": 27, }, "start": Object { - "column": 11, - "line": 2, + "column": 22, + "line": 27, }, }, "range": Array [ - 21, - 22, + 444, + 445, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 3, + "line": 28, }, "start": Object { - "column": 12, - "line": 2, + "column": 2, + "line": 28, }, }, "range": Array [ - 22, - 23, + 448, + 449, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 1, + "line": 29, }, "start": Object { - "column": 13, - "line": 2, + "column": 0, + "line": 29, }, }, "range": Array [ - 23, - 24, + 450, + 451, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/expressions/new-expression-type-arguments.src 1`] = ` +exports[`typescript fixtures/types/tuple.src 1`] = ` Object { "body": Array [ Object { @@ -65727,88 +119962,59 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 31, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, - "name": "a", + "name": "x", "range": Array [ - 6, - 7, + 4, + 31, ], "type": "Identifier", - }, - "init": Object { - "arguments": Array [], - "callee": Object { + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, + "column": 31, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, - "name": "A", "range": Array [ - 14, - 15, + 5, + 31, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 20, - ], - "type": "NewExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "range": Array [ + 8, + 14, + ], + "type": "TSNumberKeyword", }, - "range": Array [ - 16, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { + Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { @@ -65816,43 +120022,70 @@ Object { "line": 1, }, }, - "name": "B", "range": Array [ 16, - 17, + 22, ], - "type": "Identifier", + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 30, + ], + "type": "TSNumberKeyword", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, }, - ], - "range": Array [ - 15, - 18, - ], - "type": "TSTypeParameterInstantiation", + "range": Array [ + 7, + 31, + ], + "type": "TSTupleType", + }, }, }, + "init": null, "loc": Object { "end": Object { - "column": 20, + "column": 31, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 20, + 4, + 31, ], "type": "VariableDeclarator", }, ], - "kind": "const", + "kind": "let", "loc": Object { "end": Object { - "column": 21, + "column": 32, "line": 1, }, "start": Object { @@ -65862,16 +120095,16 @@ Object { }, "range": Array [ 0, - 21, + 32, ], "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { - "end": Object { - "column": 21, - "line": 1, + "end": Object { + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -65880,14 +120113,14 @@ Object { }, "range": Array [ 0, - 21, + 33, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -65897,105 +120130,105 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "const", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 13, + 7, + 8, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 14, - 15, ], "type": "Identifier", - "value": "A", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { @@ -66005,79 +120238,79 @@ Object { }, "range": Array [ 16, - 17, + 22, ], "type": "Identifier", - "value": "B", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 22, "line": 1, }, }, "range": Array [ - 17, - 18, + 22, + 23, ], "type": "Punctuator", - "value": ">", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 30, "line": 1, }, "start": Object { - "column": 18, + "column": 24, "line": 1, }, }, "range": Array [ - 18, - 19, + 24, + 30, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 31, "line": 1, }, "start": Object { - "column": 19, + "column": 30, "line": 1, }, }, "range": Array [ - 19, - 20, + 30, + 31, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 32, "line": 1, }, "start": Object { - "column": 20, + "column": 31, "line": 1, }, }, "range": Array [ - 20, - 21, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -66087,144 +120320,451 @@ Object { } `; -exports[`typescript fixtures/expressions/tagged-template-expression-type-arguments.src 1`] = ` +exports[`typescript fixtures/types/tuple-empty.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasi": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, - }, - "quasis": Array [ - Object { + "name": "x", + "range": Array [ + 4, + 9, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 13, + 5, + 9, ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "baz", - "raw": "baz", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementTypes": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "TSTupleType", }, }, - ], - "range": Array [ - 8, - 13, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 13, - ], - "tag": Object { + }, + "init": null, "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, - "name": "foo", "range": Array [ - 0, - 3, + 4, + 9, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "type": "TaggedTemplateExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/tuple-optional.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "name": "x", + "range": Array [ + 4, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 7, + "column": 44, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 7, + 5, + 44, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSNumberKeyword", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 43, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 42, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 41, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSNumberKeyword", + }, + ], + }, + }, + }, + ], "loc": Object { "end": Object { - "column": 7, + "column": 44, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, - "name": "bar", "range": Array [ - 4, 7, + 44, ], - "type": "Identifier", + "type": "TSTupleType", }, }, - ], + }, + "init": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ - 3, - 8, + 4, + 44, ], - "type": "TSTypeParameterInstantiation", + "type": "VariableDeclarator", }, - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 14, + "column": 44, "line": 1, }, "start": Object { @@ -66234,16 +120774,16 @@ Object { }, "range": Array [ 0, - 14, + 44, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -66252,7 +120792,7 @@ Object { }, "range": Array [ 0, - 14, + 45, ], "sourceType": "module", "tokens": Array [ @@ -66271,44 +120811,44 @@ Object { 0, 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, 4, + 5, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 7, + 5, + 6, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -66326,12 +120866,12 @@ Object { 8, ], "type": "Punctuator", - "value": ">", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { @@ -66341,614 +120881,365 @@ Object { }, "range": Array [ 8, - 13, + 14, ], - "type": "Template", - "value": "\`baz\`", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 34, - 54, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 49, - 53, - ], - "raw": "'fs'", - "type": "Literal", - "value": "fs", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "fs", - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - }, - "range": Array [ - 41, - 43, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 56, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 29, - ], - "raw": "\\"i-use-things\\"", - "type": "Literal", - "value": "i-use-things", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, - 56, + 16, + 22, ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "number", }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 7, + 22, + 23, ], - "type": "Identifier", - "value": "declare", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 24, "line": 1, }, "start": Object { - "column": 8, + "column": 23, "line": 1, }, }, "range": Array [ - 8, - 14, + 23, + 24, ], - "type": "Identifier", - "value": "module", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 26, "line": 1, }, "start": Object { - "column": 15, + "column": 25, "line": 1, }, }, "range": Array [ - 15, - 29, + 25, + 26, ], - "type": "String", - "value": "\\"i-use-things\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 32, "line": 1, }, "start": Object { - "column": 30, + "column": 26, "line": 1, }, }, "range": Array [ - 30, - 31, + 26, + 32, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ + 33, 34, - 40, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ + 35, 41, - 43, - ], - "type": "Identifier", - "value": "fs", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, ], "type": "Identifier", - "value": "from", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 49, - 53, + 41, + 42, ], - "type": "String", - "value": "'fs'", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 53, - 54, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 44, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 43, + "line": 1, }, }, "range": Array [ - 55, - 56, + 43, + 44, ], "type": "Punctuator", - "value": "}", + "value": "]", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = ` +exports[`typescript fixtures/types/tuple-rest.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "async": false, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "select", - "range": Array [ - 41, - 47, - ], - "type": "Identifier", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "start": Object { + "column": 4, + "line": 1, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "selector", - "range": Array [ - 48, - 64, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 32, - 82, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 65, - 81, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 67, - 81, - ], - "type": "TSTypeReference", - "typeName": Object { + }, + "name": "x", + "range": Array [ + 4, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementTypes": Array [ + Object { "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 44, - "line": 2, + "column": 8, + "line": 1, }, }, - "name": "Selection", "range": Array [ - 67, - 76, + 8, + 14, ], - "type": "Identifier", + "type": "TSStringKeyword", }, - "typeParameters": Object { + Object { "loc": Object { "end": Object { - "column": 58, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 53, - "line": 2, + "column": 16, + "line": 1, }, }, - "params": Array [ - Object { + "range": Array [ + 16, + 27, + ], + "type": "TSRestType", + "typeAnnotation": Object { + "elementType": Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 54, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 77, - 80, + 19, + 25, ], - "type": "TSAnyKeyword", + "type": "TSNumberKeyword", }, - ], - "range": Array [ - 76, - 81, - ], - "type": "TSTypeParameterInstantiation", + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 27, + ], + "type": "TSArrayType", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, }, - }, - "type": "TSDeclareFunction", - }, - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, + "range": Array [ + 7, + 28, + ], + "type": "TSTupleType", }, }, - "range": Array [ - 25, - 82, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 84, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, }, - "start": Object { - "column": 18, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 28, + ], + "type": "VariableDeclarator", }, - "name": "d3", - "range": Array [ - 18, - 20, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -66957,16 +121248,16 @@ Object { }, "range": Array [ 0, - 84, + 28, ], - "type": "TSModuleDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -66975,14 +121266,14 @@ Object { }, "range": Array [ 0, - 84, + 29, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -66992,1249 +121283,1907 @@ Object { }, "range": Array [ 0, - 7, + 3, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 17, + 4, + 5, ], "type": "Identifier", - "value": "namespace", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 6, "line": 1, }, "start": Object { - "column": 18, + "column": 5, "line": 1, }, }, "range": Array [ - 18, - 20, + 5, + 6, ], - "type": "Identifier", - "value": "d3", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { "column": 8, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 25, - 31, + 14, + 15, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 32, - 40, + 16, + 19, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 41, - 47, + 19, + 25, ], "type": "Identifier", - "value": "select", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 47, - 48, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 48, - 56, + 26, + 27, ], - "type": "Identifier", - "value": "selector", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 56, - 57, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": "]", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/tuple-type.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 58, - 64, + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "TSStringKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 28, + ], + "type": "TSTupleType", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, ], "type": "Identifier", - "value": "string", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 64, - 65, + 5, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 42, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 65, - 66, + 9, + 10, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 44, - "line": 2, + "column": 11, + "line": 1, }, }, - "range": Array [ - 67, - 76, + "range": Array [ + 11, + 12, ], - "type": "Identifier", - "value": "Selection", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 54, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 53, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 76, - 77, + 12, + 18, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 54, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 77, - 80, + 18, + 19, ], - "type": "Identifier", - "value": "any", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 57, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 80, - 81, + 20, + 26, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 58, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 81, - 82, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 83, - 84, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "]", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/module-with-default-exports.src 1`] = ` +exports[`typescript fixtures/types/type-literal.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [ + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 4, + 22, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 22, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "members": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 1, }, }, - "name": "method", + "name": "x", "range": Array [ - 52, - 58, + 11, + 12, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 52, - 66, + 11, + 20, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 64, - 66, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "type": "TSPropertySignature", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, }, - "params": Array [], "range": Array [ - 58, - 66, + 12, + 20, ], - "returnType": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 60, - 63, + 14, + 20, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "name": "C", - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - }, - }, + "type": "TSNumberKeyword", }, - "type": "FunctionExpression", }, }, ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 42, - 73, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "C", "range": Array [ - 40, - 41, + 9, + 22, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 34, - 73, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "TSTypeLiteral", }, }, - "range": Array [ - 19, - 73, - ], - "type": "ExportDefaultDeclaration", }, - Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 34, - "line": 5, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 93, - 110, - ], - "type": "FunctionDeclaration", + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "start": Object { + "column": 4, + "line": 1, }, - "range": Array [ - 78, - 110, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 1, }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 13, - 112, - ], - "type": "TSModuleBlock", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "range": Array [ + 0, + 23, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "obj", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "range": Array [ - 7, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 12, + "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 112, + 11, + 12, ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, + "type": "Identifier", + "value": "x", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 114, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 6, + 14, + 20, ], "type": "Identifier", - "value": "module", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 7, + "column": 21, "line": 1, }, }, "range": Array [ - 7, - 12, + 21, + 22, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 22, "line": 1, }, }, "range": Array [ - 13, - 14, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/type-operator.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 14, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 14, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "operator": "keyof", + "range": Array [ + 7, + 14, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 19, - 25, + 0, + 15, ], - "type": "Keyword", - "value": "export", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "y", + "range": Array [ + 20, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 21, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "operator": "unique", + "range": Array [ + 23, + 36, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSSymbolKeyword", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 36, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 2, }, "start": Object { - "column": 11, + "column": 0, "line": 2, }, }, "range": Array [ - 26, - 33, + 16, + 37, ], - "type": "Keyword", - "value": "default", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 34, - 39, + 0, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 40, - 41, + 4, + 5, ], "type": "Identifier", - "value": "C", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 42, - 43, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 52, - 58, + 7, + 12, ], "type": "Identifier", - "value": "method", + "value": "keyof", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 58, - 59, + 13, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 59, - 60, + 14, + 15, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 3, + "line": 2, }, "start": Object { - "column": 16, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 60, - 61, + 16, + 19, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 5, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 62, - 63, + 20, + 21, ], "type": "Identifier", - "value": "C", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 6, + "line": 2, }, "start": Object { - "column": 20, - "line": 3, + "column": 5, + "line": 2, }, }, "range": Array [ - 64, - 65, + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 65, - 66, + 23, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "unique", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 22, - "line": 3, + "column": 14, + "line": 2, }, }, "range": Array [ - 66, - 67, + 30, + 36, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "symbol", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 21, + "line": 2, }, - "start": Object { - "column": 4, - "line": 4, + "start": Object { + "column": 20, + "line": 2, }, }, "range": Array [ - 72, - 73, + 36, + 37, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/typeof.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 17, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 17, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "exprName": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "TSTypeQuery", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 17, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 78, - 84, + 0, + 18, ], - "type": "Keyword", - "value": "export", + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 3, + "line": 1, }, "start": Object { - "column": 11, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 85, - 92, + 0, + 3, ], "type": "Keyword", - "value": "default", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 19, - "line": 5, + "column": 4, + "line": 1, }, }, "range": Array [ - 93, - 101, + 4, + 5, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 5, + "column": 6, + "line": 1, }, "start": Object { - "column": 28, - "line": 5, + "column": 5, + "line": 1, }, }, "range": Array [ - 102, - 105, + 5, + 6, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 31, - "line": 5, + "column": 7, + "line": 1, }, }, "range": Array [ - 105, - 106, + 7, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 5, + "column": 15, + "line": 1, }, "start": Object { - "column": 32, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 106, - 107, + 14, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 34, - "line": 5, + "column": 15, + "line": 1, }, }, "range": Array [ - 108, - 109, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 35, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 109, - 110, + 16, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 18, + "line": 1, }, "start": Object { - "column": 0, - "line": 6, + "column": 17, + "line": 1, }, }, "range": Array [ - 111, - 112, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/nested-internal-module.src 1`] = ` +exports[`typescript fixtures/types/union-intersection.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "union", + "range": Array [ + 4, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 36, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 11, + "line": 1, }, }, - "name": "x", "range": Array [ - 27, - 28, + 11, + 17, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, - "init": Object { + Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ - 31, - 44, + 20, + 24, ], - "raw": "'hello world'", - "type": "Literal", - "value": "hello world", + "type": "TSNullKeyword", }, - "loc": Object { - "end": Object { - "column": 32, - "line": 3, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, }, - "start": Object { - "column": 15, - "line": 3, + "range": Array [ + 27, + 36, + ], + "type": "TSUndefinedKeyword", + }, + ], + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 36, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "intersection", + "range": Array [ + 42, + 71, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 54, + 71, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 56, + 71, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 56, + 62, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, }, + "range": Array [ + 65, + 71, + ], + "type": "TSStringKeyword", }, - "range": Array [ - 27, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, + ], }, - "range": Array [ - 23, - 44, - ], - "type": "VariableDeclaration", }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 42, + 71, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 38, + 72, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 32, + "column": 42, "line": 3, }, "start": Object { @@ -68242,580 +123191,322 @@ Object { "line": 3, }, }, + "name": "precedence1", "range": Array [ - 16, - 44, + 77, + 115, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "declaration": Object { - "body": Object { - "body": Array [ + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 88, + 115, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 90, + 115, + ], + "type": "TSUnionType", + "types": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, }, - "name": "constructor", - "range": Array [ - 78, - 89, - ], - "type": "Identifier", }, - "kind": "constructor", + "range": Array [ + 90, + 96, + ], + "type": "TSNumberKeyword", + }, + Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 42, + "line": 3, }, "start": Object { - "column": 8, - "line": 5, + "column": 26, + "line": 3, }, }, "range": Array [ - 78, - 129, + 99, + 115, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "TSIntersectionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 32, + "line": 3, }, "start": Object { - "column": 56, - "line": 5, + "column": 26, + "line": 3, }, }, "range": Array [ - 126, - 129, + 99, + 105, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, + "type": "TSStringKeyword", }, - "params": Array [ - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 97, - 106, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "range": Array [ - 98, - 106, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "range": Array [ - 90, - 106, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "name": "y", - "range": Array [ - 115, - 124, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 46, - "line": 5, - }, - }, - "range": Array [ - 116, - 124, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "TSNumberKeyword", - }, - }, + "start": Object { + "column": 35, + "line": 3, }, - "range": Array [ - 108, - 124, - ], - "type": "TSParameterProperty", }, - ], - "range": Array [ - 89, - 129, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 68, - 135, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, + "range": Array [ + 108, + 115, + ], + "type": "TSBooleanKeyword", + }, + ], }, - }, - "name": "Point", - "range": Array [ - 62, - 67, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 4, - }, }, - "range": Array [ - 56, - 135, - ], - "superClass": null, - "type": "ClassDeclaration", }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 4, - }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, }, - "range": Array [ - 49, - 135, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", }, - Object { - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "name": "name", - "range": Array [ - 200, - 204, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 200, - 213, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "range": Array [ - 204, - 212, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], + "range": Array [ + 77, + 115, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 73, + 116, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "precedence2", + "range": Array [ + 121, + 159, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 132, + 159, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 134, + 159, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 134, + 149, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 23, + "line": 4, }, "start": Object { - "column": 28, - "line": 8, + "column": 17, + "line": 4, }, }, "range": Array [ - 186, - 223, + 134, + 140, ], - "type": "TSInterfaceBody", + "type": "TSNumberKeyword", }, - "id": Object { + Object { "loc": Object { "end": Object { - "column": 27, - "line": 8, + "column": 32, + "line": 4, }, "start": Object { - "column": 25, - "line": 8, + "column": 26, + "line": 4, }, }, - "name": "Id", "range": Array [ - 183, - 185, + 143, + 149, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 8, - }, + "type": "TSStringKeyword", }, - "range": Array [ - 173, - 223, - ], - "type": "TSInterfaceDeclaration", - }, + ], + }, + Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 42, + "line": 4, }, "start": Object { - "column": 8, - "line": 8, + "column": 35, + "line": 4, }, }, "range": Array [ - 166, - 223, + 152, + 159, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 156, - 229, - ], - "type": "TSModuleBlock", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, + "type": "TSBooleanKeyword", }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "name": "B", - "range": Array [ - 154, - 155, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 147, - 229, - ], - "type": "TSModuleDeclaration", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 7, }, }, - "range": Array [ - 140, - 229, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 231, - ], - "type": "TSModuleBlock", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, }, - "start": Object { - "column": 7, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, }, + "range": Array [ + 121, + 159, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 43, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 231, + 117, + 160, ], - "type": "TSModuleDeclaration", + "type": "VariableDeclaration", }, ], "comments": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -68824,14 +123515,14 @@ Object { }, "range": Array [ 0, - 231, + 161, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -68841,28 +123532,28 @@ Object { }, "range": Array [ 0, - 6, + 3, ], - "type": "Identifier", - "value": "module", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 8, + 4, + 9, ], "type": "Identifier", - "value": "A", + "value": "union", }, Object { "loc": Object { @@ -68880,346 +123571,166 @@ Object { 10, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "x", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { "column": 17, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 31, - 44, - ], - "type": "String", - "value": "'hello world'", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 49, - 55, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, + "line": 1, }, "start": Object { "column": 11, - "line": 4, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, + "line": 1, }, }, "range": Array [ - 62, - 67, + 11, + 17, ], "type": "Identifier", - "value": "Point", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 78, - 89, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, + "line": 1, }, "start": Object { - "column": 19, - "line": 5, + "column": 18, + "line": 1, }, }, "range": Array [ - 89, - 90, + 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { "column": 20, - "line": 5, + "line": 1, }, }, "range": Array [ - 90, - 96, + 20, + 24, ], "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Identifier", - "value": "x", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 28, - "line": 5, + "column": 25, + "line": 1, }, }, "range": Array [ - 98, - 99, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "|", }, Object { "loc": Object { "end": Object { "column": 36, - "line": 5, + "line": 1, }, "start": Object { - "column": 30, - "line": 5, + "column": 27, + "line": 1, }, }, - "range": Array [ - 100, - 106, + "range": Array [ + 27, + 36, ], "type": "Identifier", - "value": "number", + "value": "undefined", }, Object { "loc": Object { "end": Object { "column": 37, - "line": 5, + "line": 1, }, "start": Object { "column": 36, - "line": 5, + "line": 1, }, }, "range": Array [ - 106, - 107, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 5, + "column": 3, + "line": 2, }, "start": Object { - "column": 38, - "line": 5, + "column": 0, + "line": 2, }, }, "range": Array [ - 108, - 114, + 38, + 41, ], "type": "Keyword", - "value": "public", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 5, + "column": 16, + "line": 2, }, "start": Object { - "column": 45, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 115, - 116, + 42, + 54, ], "type": "Identifier", - "value": "y", + "value": "intersection", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 5, + "column": 17, + "line": 2, }, "start": Object { - "column": 46, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 116, - 117, + 54, + 55, ], "type": "Punctuator", "value": ":", @@ -69227,17 +123738,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 54, - "line": 5, + "column": 24, + "line": 2, }, "start": Object { - "column": 48, - "line": 5, + "column": 18, + "line": 2, }, }, "range": Array [ - 118, - 124, + 56, + 62, ], "type": "Identifier", "value": "number", @@ -69245,251 +123756,269 @@ Object { Object { "loc": Object { "end": Object { - "column": 55, - "line": 5, + "column": 26, + "line": 2, }, "start": Object { - "column": 54, - "line": 5, + "column": 25, + "line": 2, }, }, "range": Array [ - 124, - 125, + 63, + 64, ], "type": "Punctuator", - "value": ")", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 5, + "column": 33, + "line": 2, }, "start": Object { - "column": 56, - "line": 5, + "column": 27, + "line": 2, }, }, "range": Array [ - 126, - 127, + 65, + 71, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 34, + "line": 2, }, "start": Object { - "column": 58, - "line": 5, + "column": 33, + "line": 2, }, }, "range": Array [ - 128, - 129, + 71, + 72, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 6, + "column": 3, + "line": 3, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 3, }, }, "range": Array [ - 134, - 135, + 73, + 76, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, "start": Object { "column": 4, - "line": 7, + "line": 3, }, }, "range": Array [ - 140, - 146, + 77, + 88, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "precedence1", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 16, + "line": 3, }, "start": Object { - "column": 11, - "line": 7, + "column": 15, + "line": 3, }, }, "range": Array [ - 147, - 153, + 88, + 89, ], - "type": "Identifier", - "value": "module", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 23, + "line": 3, }, "start": Object { - "column": 18, - "line": 7, + "column": 17, + "line": 3, }, }, "range": Array [ - 154, - 155, + 90, + 96, ], "type": "Identifier", - "value": "B", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 25, + "line": 3, }, "start": Object { - "column": 20, - "line": 7, + "column": 24, + "line": 3, }, }, "range": Array [ - 156, - 157, + 97, + 98, ], "type": "Punctuator", - "value": "{", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 32, + "line": 3, }, "start": Object { - "column": 8, - "line": 8, + "column": 26, + "line": 3, }, }, "range": Array [ - 166, - 172, + 99, + 105, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 8, + "column": 34, + "line": 3, }, "start": Object { - "column": 15, - "line": 8, + "column": 33, + "line": 3, }, }, "range": Array [ - 173, - 182, + 106, + 107, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 8, + "column": 42, + "line": 3, }, "start": Object { - "column": 25, - "line": 8, + "column": 35, + "line": 3, }, }, "range": Array [ - 183, - 185, + 108, + 115, ], "type": "Identifier", - "value": "Id", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 8, + "column": 43, + "line": 3, }, "start": Object { - "column": 28, - "line": 8, + "column": 42, + "line": 3, }, }, "range": Array [ - 186, - 187, + 115, + 116, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 3, + "line": 4, }, "start": Object { - "column": 12, - "line": 9, + "column": 0, + "line": 4, }, }, "range": Array [ - 200, - 204, + 117, + 120, ], - "type": "Identifier", - "value": "name", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "column": 15, + "line": 4, }, "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 121, + 132, + ], + "type": "Identifier", + "value": "precedence2", + }, + Object { + "loc": Object { + "end": Object { "column": 16, - "line": 9, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, }, }, "range": Array [ - 204, - 205, + 132, + 133, ], "type": "Punctuator", "value": ":", @@ -69497,125 +124026,141 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 9, + "column": 23, + "line": 4, }, "start": Object { - "column": 18, - "line": 9, + "column": 17, + "line": 4, }, }, "range": Array [ - 206, - 212, + 134, + 140, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 9, + "line": 4, }, "start": Object { "column": 24, - "line": 9, + "line": 4, }, }, "range": Array [ - 212, - 213, + 141, + 142, ], "type": "Punctuator", - "value": ";", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 32, + "line": 4, }, "start": Object { - "column": 8, - "line": 10, + "column": 26, + "line": 4, }, }, "range": Array [ - 222, - 223, + 143, + 149, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 11, + "column": 34, + "line": 4, }, "start": Object { - "column": 4, - "line": 11, + "column": 33, + "line": 4, }, }, "range": Array [ - 228, - 229, + 150, + 151, ], "type": "Punctuator", - "value": "}", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 42, + "line": 4, }, "start": Object { - "column": 0, - "line": 12, + "column": 35, + "line": 4, }, }, "range": Array [ - 230, - 231, + 152, + 159, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 4, + }, + "start": Object { + "column": 42, + "line": 4, + }, + }, + "range": Array [ + 159, + 160, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = ` +exports[`typescript fixtures/types/union-type.src 1`] = ` Object { "body": Array [ Object { - "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 31, + "column": 8, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, + "name": "Foo", "range": Array [ - 15, - 31, + 5, + 8, ], - "raw": "\\"hot-new-module\\"", - "type": "Literal", - "value": "hot-new-module", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 32, + "column": 26, "line": 1, }, "start": Object { @@ -69625,9 +124170,62 @@ Object { }, "range": Array [ 0, - 32, + 26, ], - "type": "TSModuleDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 26, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "TSNumberKeyword", + }, + ], + }, }, ], "comments": Array [], @@ -69643,14 +124241,14 @@ Object { }, "range": Array [ 0, - 33, + 27, ], "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -69660,64 +124258,100 @@ Object { }, "range": Array [ 0, - 7, + 4, ], "type": "Identifier", - "value": "declare", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 8, - 14, ], "type": "Identifier", - "value": "module", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 31, + 9, + 10, ], - "type": "String", - "value": "\\"hot-new-module\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 17, "line": 1, }, "start": Object { - "column": 31, + "column": 11, "line": 1, }, }, "range": Array [ - 31, - 32, + 11, + 17, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, ], "type": "Punctuator", - "value": ";", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Identifier", + "value": "number", }, ], "type": "Program", diff --git a/packages/typescript-eslint-parser/tests/lib/basics.js b/packages/typescript-eslint-parser/tests/lib/basics.js index 6542baf66287..4a6302684b01 100644 --- a/packages/typescript-eslint-parser/tests/lib/basics.js +++ b/packages/typescript-eslint-parser/tests/lib/basics.js @@ -12,10 +12,9 @@ // Requirements //------------------------------------------------------------------------------ -const - path = require("path"), +const fs = require("fs"), + glob = require('glob'), { Linter } = require("eslint"), - shelljs = require("shelljs"), testUtils = require("../../tools/test-utils"), parser = require("../../"); @@ -24,11 +23,7 @@ const //------------------------------------------------------------------------------ const FIXTURES_DIR = "./tests/fixtures/basics"; - -const testFiles = shelljs.find(FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.js") > -1) - // strip off ".src.js" - .map(filename => filename.substring(FIXTURES_DIR.length - 1, filename.length - 7)); +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.js`); //------------------------------------------------------------------------------ // Tests @@ -36,8 +31,8 @@ const testFiles = shelljs.find(FIXTURES_DIR) describe("basics", () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`); - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code)); + const code = fs.readFileSync(filename, 'utf8'); + test(testUtils.formatSnapshotName(filename, FIXTURES_DIR), testUtils.createSnapshotTestBlock(code)); }); test("https://github.com/eslint/typescript-eslint-parser/issues/476", () => { diff --git a/packages/typescript-eslint-parser/tests/lib/comments.js b/packages/typescript-eslint-parser/tests/lib/comments.js index e6714f16e8f0..4c9f749a4e73 100644 --- a/packages/typescript-eslint-parser/tests/lib/comments.js +++ b/packages/typescript-eslint-parser/tests/lib/comments.js @@ -12,32 +12,28 @@ // Requirements //------------------------------------------------------------------------------ -const path = require("path"), - shelljs = require("shelljs"), - testUtils = require("../../tools/test-utils"); +const fs = require("fs"), + glob = require('glob'), + testUtils = require("../../tools/test-utils"); //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = "./tests/fixtures/comments"; - -const testFiles = shelljs.find(FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.js") > -1) - // strip off ".src.js" - .map(filename => filename.substring(FIXTURES_DIR.length - 1, filename.length - 7)); +const FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/comments"; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.js`); //------------------------------------------------------------------------------ // Tests //------------------------------------------------------------------------------ describe("Comments", () => { - testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`); - const config = { - jsx: true, - sourceType: "module" - }; - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code, config)); - }); + testFiles.forEach(filename => { + const code = fs.readFileSync(filename, 'utf8'); + const config = { + jsx: true, + sourceType: "module" + }; + test(testUtils.formatSnapshotName(filename, FIXTURES_DIR), testUtils.createSnapshotTestBlock(code, config)); + }); }); diff --git a/packages/typescript-eslint-parser/tests/lib/ecma-features.js b/packages/typescript-eslint-parser/tests/lib/javascript.js similarity index 55% rename from packages/typescript-eslint-parser/tests/lib/ecma-features.js rename to packages/typescript-eslint-parser/tests/lib/javascript.js index 5fe5821757f4..7e6560264db1 100644 --- a/packages/typescript-eslint-parser/tests/lib/ecma-features.js +++ b/packages/typescript-eslint-parser/tests/lib/javascript.js @@ -12,28 +12,24 @@ // Requirements //------------------------------------------------------------------------------ -const path = require("path"), - shelljs = require("shelljs"), - testUtils = require("../../tools/test-utils"); +const fs = require("fs"), + glob = require('glob'), + testUtils = require("../../tools/test-utils"); //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = "./tests/fixtures/ecma-features"; - -const testFiles = shelljs.find(FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.js") > -1) - // strip off ".src.js" - .map(filename => filename.substring(FIXTURES_DIR.length - 1, filename.length - 7)); +const FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/javascript"; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.js`); //------------------------------------------------------------------------------ // Tests //------------------------------------------------------------------------------ -describe("ecmaFeatures", () => { - testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`); - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code)); - }); +describe("javascript", () => { + testFiles.forEach(filename => { + const code = fs.readFileSync(filename, 'utf8'); + test(testUtils.formatSnapshotName(filename, FIXTURES_DIR), testUtils.createSnapshotTestBlock(code)); + }); }); diff --git a/packages/typescript-eslint-parser/tests/lib/jsx.js b/packages/typescript-eslint-parser/tests/lib/jsx.js index f1ee7fe575cc..347918c6e246 100644 --- a/packages/typescript-eslint-parser/tests/lib/jsx.js +++ b/packages/typescript-eslint-parser/tests/lib/jsx.js @@ -12,8 +12,8 @@ // Requirements //------------------------------------------------------------------------------ -const path = require("path"), - shelljs = require("shelljs"), +const fs = require("fs"), + glob = require('glob'), testUtils = require("../../tools/test-utils"), filesWithKnownIssues = require("../jsx-known-issues"); @@ -21,20 +21,12 @@ const path = require("path"), // Setup //------------------------------------------------------------------------------ -const JSX_FIXTURES_DIR = "./tests/fixtures/jsx"; +const JSX_FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/jsx"; +const jsxTestFiles = glob.sync(`${JSX_FIXTURES_DIR}/**/*.src.js`) + .filter(filename => filesWithKnownIssues.every(fileName => !filename.includes(fileName))); -const jsxTestFiles = shelljs.find(JSX_FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.js") > -1) - .filter(filename => filesWithKnownIssues.every(fileName => filename.indexOf(fileName) === -1)) - // strip off ".src.js" - .map(filename => filename.substring(JSX_FIXTURES_DIR.length - 1, filename.length - 7)); - -const JSX_JSXTEXT_FIXTURES_DIR = "./tests/fixtures/jsx-useJSXTextNode"; - -const jsxTextTestFiles = shelljs.find(JSX_JSXTEXT_FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.js") > -1) - // strip off ".src.js" - .map(filename => filename.substring(JSX_JSXTEXT_FIXTURES_DIR.length - 1, filename.length - 7)); +const JSX_JSXTEXT_FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/jsx-useJSXTextNode"; +const jsxTextTestFiles = glob.sync(`${JSX_JSXTEXT_FIXTURES_DIR}/**/*.src.js`) //------------------------------------------------------------------------------ // Tests @@ -51,12 +43,12 @@ describe("JSX", () => { function testFixture(fixturesDir, useJSXTextNode) { return filename => { - const code = shelljs.cat(`${path.resolve(fixturesDir, filename)}.src.js`); + const code = fs.readFileSync(filename, 'utf8'); const config = { useJSXTextNode, jsx: true }; - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code, config)); + test(testUtils.formatSnapshotName(filename, fixturesDir), testUtils.createSnapshotTestBlock(code, config)); }; } diff --git a/packages/typescript-eslint-parser/tests/lib/tsx.js b/packages/typescript-eslint-parser/tests/lib/tsx.js index 831d5fdad2d0..7fed450f420a 100644 --- a/packages/typescript-eslint-parser/tests/lib/tsx.js +++ b/packages/typescript-eslint-parser/tests/lib/tsx.js @@ -11,10 +11,9 @@ // Requirements //------------------------------------------------------------------------------ -const - path = require("path"), +const fs = require("fs"), + glob = require('glob'), { Linter } = require("eslint"), - shelljs = require("shelljs"), parser = require("../../"), testUtils = require("../../tools/test-utils"); @@ -22,12 +21,8 @@ const // Setup //------------------------------------------------------------------------------ -const TSX_FIXTURES_DIR = "./tests/fixtures/tsx"; - -const testFiles = shelljs.find(TSX_FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.tsx") > -1) - // strip off ".src.tsx" - .map(filename => filename.substring(TSX_FIXTURES_DIR.length - 1, filename.length - 8)); +const FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/tsx"; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.tsx`); //------------------------------------------------------------------------------ // Tests @@ -35,12 +30,12 @@ const testFiles = shelljs.find(TSX_FIXTURES_DIR) describe("TSX", () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(TSX_FIXTURES_DIR, filename)}.src.tsx`); + const code = fs.readFileSync(filename, 'utf8'); const config = { useJSXTextNode: true, jsx: true }; - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code, config)); + test(testUtils.formatSnapshotName(filename, FIXTURES_DIR, '.tsx'), testUtils.createSnapshotTestBlock(code, config)); }); describe("if the filename ends with '.tsx', enable jsx option automatically.", () => { diff --git a/packages/typescript-eslint-parser/tests/lib/typescript.js b/packages/typescript-eslint-parser/tests/lib/typescript.js index 6e9f654c44d4..aa79fea983ab 100644 --- a/packages/typescript-eslint-parser/tests/lib/typescript.js +++ b/packages/typescript-eslint-parser/tests/lib/typescript.js @@ -12,20 +12,16 @@ // Requirements //------------------------------------------------------------------------------ -const path = require("path"), - shelljs = require("shelljs"), +const fs = require("fs"), + glob = require('glob'), testUtils = require("../../tools/test-utils"); //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = "./tests/fixtures/typescript"; - -const testFiles = shelljs.find(FIXTURES_DIR) - .filter(filename => filename.indexOf(".src.ts") > -1) - // strip off ".src.ts" - .map(filename => filename.substring(FIXTURES_DIR.length - 1, filename.length - 7)); +const FIXTURES_DIR = "../../node_modules/@typescript-eslint/shared-fixtures/fixtures/typescript"; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.ts`); //------------------------------------------------------------------------------ // Tests @@ -34,8 +30,8 @@ const testFiles = shelljs.find(FIXTURES_DIR) describe("typescript", () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.ts`); - test(`fixtures/${filename}.src`, testUtils.createSnapshotTestBlock(code)); + const code = fs.readFileSync(filename, 'utf8'); + test(testUtils.formatSnapshotName(filename, FIXTURES_DIR, '.ts'), testUtils.createSnapshotTestBlock(code)); }); }); diff --git a/packages/typescript-eslint-parser/tools/test-utils.js b/packages/typescript-eslint-parser/tools/test-utils.js index f9d2e942b3ea..11d6fd38008e 100644 --- a/packages/typescript-eslint-parser/tools/test-utils.js +++ b/packages/typescript-eslint-parser/tools/test-utils.js @@ -79,7 +79,12 @@ function createSnapshotTestBlock(code, config = {}) { } +function formatSnapshotName(filename, fixturesDir, fileExtension = '.js') { + return `fixtures/${filename.replace(fixturesDir + '/', '').replace(fileExtension, '')}`; +} + module.exports = { getRaw, - createSnapshotTestBlock + createSnapshotTestBlock, + formatSnapshotName }; diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/block-trailing-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/block-trailing-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/block-trailing-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/block-trailing-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/comment-within-condition.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/comment-within-condition.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/comment-within-condition.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/comment-within-condition.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/export-default-anonymous-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/export-default-anonymous-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/export-default-anonymous-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/export-default-anonymous-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/jsdoc-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsdoc-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/jsdoc-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsdoc-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/jsx-block-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-block-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/jsx-block-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-block-comment.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-comment-after-jsx.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-comment-after-jsx.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-comment-after-jsx.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-comment-after-jsx.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/jsx-tag-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-tag-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/jsx-tag-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-tag-comments.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-text-with-multiline-non-comment.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-text-with-multiline-non-comment.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-text-with-url.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-text-with-url.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-text-with-url.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-text-with-url.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-with-greather-than.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-with-greather-than.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-with-greather-than.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-with-greather-than.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-with-operators.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-with-operators.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/jsx-with-operators.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/jsx-with-operators.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/line-comment-with-block-syntax.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/line-comment-with-block-syntax.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/line-comment-with-block-syntax.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/line-comment-with-block-syntax.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/mix-line-and-block-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/mix-line-and-block-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/mix-line-and-block-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/mix-line-and-block-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/no-comment-regex.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/no-comment-regex.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/no-comment-regex.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/no-comment-regex.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/no-comment-template.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/no-comment-template.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/no-comment-template.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/no-comment-template.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-call-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-call-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-call-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-call-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-debugger-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-debugger-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-debugger-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-debugger-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-return-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-return-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-return-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-return-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-throw-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-throw-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-throw-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-throw-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-while-loop-comments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-while-loop-comments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/surrounding-while-loop-comments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/surrounding-while-loop-comments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/switch-fallthrough-comment-in-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-fallthrough-comment-in-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/switch-fallthrough-comment-in-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-fallthrough-comment-in-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/switch-fallthrough-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-fallthrough-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/switch-fallthrough-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-fallthrough-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment-in-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment-in-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment-in-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment-in-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/switch-no-default-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/switch-no-default-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/comments/template-string-block.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/comments/template-string-block.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/comments/template-string-block.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/template-string-block.src.js diff --git a/packages/typescript-estree/tests/fixtures/comments/type-assertion-regression-test.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/comments/type-assertion-regression-test.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/comments/type-assertion-regression-test.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/comments/type-assertion-regression-test.src.ts diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/as-param-with-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/as-param-with-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/as-param-with-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/as-param-with-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/as-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/as-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/as-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/as-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/basic-in-binary-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/basic-in-binary-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/basic.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/basic.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/basic.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/basic.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/block-body-not-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/block-body-not-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/block-body-not-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/block-body-not-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/block-body.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/block-body.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/block-body.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/block-body.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-dup-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-dup-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-dup-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-dup-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-missing-paren.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-missing-paren.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-missing-paren.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-missing-paren.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-not-arrow.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-not-arrow.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-not-arrow.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-not-arrow.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-numeric-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-numeric-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-reverse-arrow.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-reverse-arrow.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-default-param-eval.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-default-param-eval.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-dup-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-dup-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval-return.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval-return.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-eval.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-eval.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-octal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-octal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-octal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-octal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-arguments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-arguments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-eval.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-eval.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-names.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-names.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-arguments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-arguments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-eval.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-eval.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-two-lines.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-two-lines.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-two-lines.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-two-lines.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-wrapped-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/error-wrapped-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/iife.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/iife.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/iife.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/iife.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/multiple-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/multiple-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/multiple-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/multiple-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/no-auto-return.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/no-auto-return.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/no-auto-return.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/no-auto-return.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-arguments.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-arguments.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-eval.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-eval.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-octal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-octal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/not-strict-octal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/not-strict-octal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/return-arrow-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/return-arrow-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/return-arrow-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/return-arrow-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/return-sequence.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/return-sequence.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/return-sequence.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/return-sequence.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param-parens.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param-parens.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param-parens.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param-parens.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param-return-identifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param-return-identifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/arrowFunctions/single-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/arrowFunctions/single-param.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/and-operator-array-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/and-operator-array-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/and-operator-array-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/and-operator-array-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/delete-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/delete-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/delete-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/delete-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/do-while-statements.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/do-while-statements.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/do-while-statements.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/do-while-statements.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/identifiers-double-underscore.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/identifiers-double-underscore.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/identifiers-double-underscore.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/identifiers-double-underscore.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/instanceof.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/instanceof.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/instanceof.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/instanceof.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/new-with-member-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/new-with-member-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/new-with-member-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/new-with-member-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/new-without-parens.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/new-without-parens.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/new-without-parens.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/new-without-parens.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/or-operator-array-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/or-operator-array-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/or-operator-array-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/or-operator-array-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/typeof-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/typeof-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/typeof-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/typeof-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/update-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/update-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/update-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/update-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/basics/void-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/void-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/basics/void-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/basics/void-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/binary.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/binary.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/binary.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/binary.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/decimal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/decimal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/decimal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/decimal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/hex.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/hex.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/hex.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/hex.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/octal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/octal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/bigIntLiterals/octal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/bigIntLiterals/octal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/invalid.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/invalid.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/invalid.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/invalid.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/lowercase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/lowercase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/lowercase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/lowercase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/uppercase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/uppercase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/binaryLiterals/uppercase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/binaryLiterals/uppercase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/const.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/const.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/const.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/const.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/let-in-switchcase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/let-in-switchcase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/let-in-switchcase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/let-in-switchcase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/let.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/let.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/blockBindings/let.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/blockBindings/let.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/callExpression/call-expression-with-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/call-expression-with-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/callExpression/call-expression-with-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/call-expression-with-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/callExpression/call-expression-with-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/call-expression-with-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/callExpression/call-expression-with-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/call-expression-with-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/callExpression/mixed-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/mixed-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/callExpression/mixed-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/mixed-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/callExpression/new-expression-with-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/new-expression-with-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/callExpression/new-expression-with-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/new-expression-with-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/callExpression/new-expression-with-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/new-expression-with-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/callExpression/new-expression-with-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/callExpression/new-expression-with-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-accessor-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-accessor-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-accessor-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-accessor-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-computed-static-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-computed-static-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-computed-static-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-computed-static-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-prototype.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-prototype.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-prototype.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-prototype.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-static.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-static.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-static.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-static.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-with-space.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-with-space.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-method-named-with-space.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-method-named-with-space.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-one-method-super.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-one-method-super.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-one-method-super.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-one-method-super.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-one-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-one-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-one-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-one-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method-named-prototype.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method-named-prototype.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method-named-prototype.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method-named-prototype.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method-named-static.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method-named-static.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method-named-static.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method-named-static.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-methods-and-accessor-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-static-methods-and-accessor-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-computed-static-methods.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-computed-static-methods.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-computed-static-methods.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-computed-static-methods.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-computed-constructor.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-computed-constructor.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-three-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-three-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-three-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-three-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-two-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-two-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods-two-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods-two-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-methods.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-methods.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-static-methods-named-constructor.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-two-static-methods-named-constructor.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor-parameters.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor-parameters.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor-parameters.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor-parameters.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor-with-space.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor-with-space.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor-with-space.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor-with-space.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/class-with-constructor.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/class-with-constructor.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/derived-class-assign-to-var.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/derived-class-assign-to-var.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/derived-class-assign-to-var.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/derived-class-assign-to-var.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/derived-class-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/derived-class-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/derived-class-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/derived-class-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class-double-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class-double-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class-double-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class-double-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-literal-derived-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-literal-derived-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/empty-literal-derived-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/empty-literal-derived-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-declaration.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-declaration.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-declaration.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-declaration.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-setter-declaration.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-setter-declaration.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-setter-declaration.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-setter-declaration.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-two-super-classes.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-two-super-classes.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/invalid-class-two-super-classes.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/invalid-class-two-super-classes.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/named-class-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/named-class-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/named-class-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/named-class-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/named-derived-class-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/named-derived-class-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/classes/named-derived-class-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/classes/named-derived-class-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/class-constructor.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/class-constructor.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/class-constructor.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/class-constructor.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/class-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/class-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/class-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/class-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/declaration.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/declaration.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/declaration.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/declaration.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/not-all-params.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/not-all-params.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/defaultParams/not-all-params.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/defaultParams/not-all-params.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-const-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-const-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-let-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-let-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-short.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-short.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-forOf/loop.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-forOf/loop.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-forOf/loop.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-forOf/loop.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/complex-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/complex-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/destructured-array-literal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/destructured-array-literal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/destructuring-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/destructuring-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/error-complex-destructured-spread-first.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/error-complex-destructured-spread-first.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/multi-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/multi-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/not-final-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/not-final-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/single-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/single-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/single-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/single-destructured.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-complex-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-complex-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-destructured-array-literal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-destructured-array-literal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-multi-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-multi-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-single-destructured.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring-and-spread/var-single-destructured.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-member.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-member.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-member.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-member.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-to-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-to-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-to-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-to-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-var-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-var-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/array-var-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/array-var-undefined.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/call-expression-destruction-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/call-expression-destruction-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring/call-expression-destruction-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/call-expression-destruction-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/call-expression-destruction-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/call-expression-destruction-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring/call-expression-destruction-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/call-expression-destruction-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-constructor-params-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-constructor-params-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/class-method-params-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/class-method-params-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-all.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-all.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-all.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-all.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-longform-nested-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-longform-nested-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-nested-all.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-nested-all.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-nested-all.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-nested-all.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-nested-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array-nested-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-all.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-all.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-all.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-all.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-assign.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-assign.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-assign.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-assign.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform-all.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform-all.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform-all.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform-all.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-longform.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-longform.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-mixed-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-mixed-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-nested-all.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-nested-all.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-nested-all.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-nested-all.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-nested-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object-nested-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/defaults-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/defaults-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/destructured-array-catch.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/destructured-array-catch.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/destructured-array-catch.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/destructured-array-catch.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/destructured-object-catch.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/destructured-object-catch.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/destructured-object-catch.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/destructured-object-catch.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/invalid-defaults-object-assign.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/invalid-defaults-object-assign.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/named-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/named-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/named-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/named-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/nested-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/nested-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/nested-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/nested-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/nested-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/nested-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/nested-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/nested-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/object-var-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/object-var-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/object-var-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/object-var-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/object-var-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/object-var-undefined.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/object-var-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/object-var-undefined.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-object-nested.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-object-nested.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-object-nested.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-object-nested.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/param-defaults-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/param-defaults-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-array-wrapped.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-array-wrapped.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-array-wrapped.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-array-wrapped.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-multi-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-multi-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-multi-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-multi-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-nested-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-nested-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-nested-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-nested-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-nested-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-nested-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-nested-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-nested-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-object-wrapped.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-object-wrapped.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-object-wrapped.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-object-wrapped.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/params-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/params-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/sparse-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/sparse-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/destructuring/sparse-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/destructuring/sparse-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/block.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/block.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/block.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/block.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/directive-in-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/directive-in-class.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/directive-in-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/directive-in-class.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/first-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/first-expression.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/first-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/first-expression.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/function-non-strict.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/function-non-strict.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/function-non-strict.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/function-non-strict.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/non-directive-string.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/non-directive-string.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/non-directive-string.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/non-directive-string.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/non-unique-directive.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/non-unique-directive.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/non-unique-directive.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/non-unique-directive.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/program-order.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/program-order.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/program-order.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/program-order.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/program.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/program.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/program.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/program.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/directives/raw.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/raw.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/directives/raw.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/directives/raw.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalAsyncIteration/async-generators.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalAsyncIteration/async-generators.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalAsyncIteration/async-iterator.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalAsyncIteration/async-iterator.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalDynamicImport/dynamic-import.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalDynamicImport/dynamic-import.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/arg-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/arg-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/destructuring-assign-mirror.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/destructuring-assign-mirror.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/function-parameter-object-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/function-parameter-object-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/object-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/object-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/property-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/property-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-method-args.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-method-args.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-methods.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-methods.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/single-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/single-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/spread-trailing-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/spread-trailing-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/two-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalObjectRestSpread/two-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/exponentiationOperators/exponential-operators.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/exponentiationOperators/exponential-operators.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/exponentiationOperators/exponential-operators.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/exponentiationOperators/exponential-operators.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-empty.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-empty.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-empty.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-empty.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-loop.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-loop.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-loop.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-loop.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-with-coma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-coma.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-with-coma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-coma.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-with-const.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-const.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-with-const.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-const.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-with-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-function.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-with-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-function.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/for/for-with-let.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-let.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/for/for-with-let.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/for/for-with-let.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-destruction-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-destruction-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-destruction-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-destruction-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-destruction.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-destruction.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-destruction.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-destruction.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-object-with-body.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-object-with-body.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-object-with-body.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-object-with-body.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-assigment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-assigment.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-assigment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-assigment.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-const.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-const.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-const.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-const.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-rest.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-rest.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-var.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-var.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forIn/for-in-with-var.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forIn/for-in-with-var.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-array.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-array.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-destruction-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-destruction-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-destruction-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-destruction-object.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-destruction.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-destruction.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-destruction.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-destruction.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-object.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-function-initializer.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-function-initializer.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-function-initializer.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-function-initializer.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-rest.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-rest.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-var-and-braces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-var-and-braces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-var-and-no-braces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/for-of-with-var-and-no-braces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/invalid-for-of-with-const-and-no-braces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/invalid-for-of-with-const-and-no-braces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/invalid-for-of-with-let-and-no-braces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/forOf/invalid-for-of-with-let-and-no-braces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/anonymous-generator.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/anonymous-generator.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/anonymous-generator.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/anonymous-generator.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/async-generator-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/async-generator-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/async-generator-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/async-generator-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/async-generator-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/async-generator-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/async-generator-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/async-generator-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/double-yield.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/double-yield.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/double-yield.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/double-yield.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/empty-generator-declaration.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/empty-generator-declaration.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/empty-generator-declaration.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/empty-generator-declaration.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/generator-declaration.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/generator-declaration.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/generator-declaration.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/generator-declaration.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-delegation.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-delegation.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-delegation.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-delegation.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value-in-call.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value-in-call.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value-in-call.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value-in-call.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value-no-semi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value-no-semi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value-no-semi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value-no-semi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/generators/yield-without-value.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/generators/yield-without-value.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-identifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-identifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-identifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-identifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-no-arg.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-no-arg.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-no-arg.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-no-arg.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-true.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-true.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/globalReturn/return-true.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/globalReturn/return-true.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/importMeta/simple-import-meta.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/importMeta/simple-import-meta.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/importMeta/simple-import-meta.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/importMeta/simple-import-meta.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/labels/label-break.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/labels/label-break.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/labels/label-break.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/labels/label-break.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/labels/label-continue.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/labels/label-continue.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/labels/label-continue.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/labels/label-continue.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-delete.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-delete.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-delete.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-delete.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-strict.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-strict.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/error-strict.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/error-strict.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-array.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-array.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-array.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-array.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-named-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-named-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-named-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-named-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-named-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-named-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-named-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-named-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-number.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-number.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-number.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-number.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-object.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-object.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-object.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-object.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-value.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-value.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-default-value.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-default-value.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-batch.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-batch.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-batch.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-batch.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-named-as-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-named-as-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-from-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-from-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-as-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-as-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-empty.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-empty.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-empty.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-empty.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifiers-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifiers-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifiers-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifiers-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-named-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-named-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var-anonymous-function.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var-anonymous-function.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var-anonymous-function.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var-anonymous-function.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var-number.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var-number.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var-number.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var-number.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/export-var.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/export-var.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-and-named-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-and-named-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-and-named-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-and-named-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-and-namespace-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-and-namespace-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-as.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-as.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default-as.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default-as.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-jquery.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-jquery.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-jquery.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-jquery.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-module.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-module.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-module.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-module.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-as-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-as-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-as-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-as-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-as-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-as-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-as-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-as-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-empty.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-empty.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-empty.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-empty.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifiers-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifiers-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifiers-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifiers-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifiers.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifiers.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-named-specifiers.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-named-specifiers.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-namespace-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-namespace-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-namespace-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-namespace-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-null-as-nil.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-null-as-nil.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/import-null-as-nil.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/import-null-as-nil.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-await.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-await.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-await.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-await.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-class.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-class.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-class.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-class.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-batch-missing-from-clause.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-batch-missing-from-clause.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-batch-token.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-batch-token.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-batch-token.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-batch-token.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default-equal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default-equal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default-equal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default-equal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default-token.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default-token.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default-token.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default-token.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-extra-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-extra-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-middle-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-export-named-middle-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-after-named-after-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-after-named-after-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-after-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-after-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-after-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-after-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-missing-module-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-missing-module-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-module-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default-module-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-missing-module-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-missing-module-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-module-specifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-module-specifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-module-specifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-module-specifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-after-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-after-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-after-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-after-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-after-namespace.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-after-namespace.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-as-missing-from.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-as-missing-from.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-extra-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-extra-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-middle-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-named-middle-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-namespace-after-named.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-namespace-after-named.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-namespace-missing-as.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/modules/invalid-import-namespace-missing-as.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/invalid-new-target.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/invalid-new-target.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/invalid-new-target.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/invalid-new-target.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/invalid-unknown-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/invalid-unknown-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/invalid-unknown-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/invalid-unknown-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/simple-new-target.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/simple-new-target.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/newTarget/simple-new-target.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/newTarget/simple-new-target.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-addition-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-addition-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-and-identifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-and-identifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-getter-and-setter.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-getter-and-setter.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-string-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-string-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-variable-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-variable-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-computed-variable-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-computed-variable-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-addition.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-addition.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-string-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-string-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/invalid-method-no-braces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/invalid-method-no-braces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/method-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/method-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-get.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-get.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-set.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-set.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-argument.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-argument.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-string-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-string-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/string-name-method-property.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandMethods/string-name-method-property.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandProperties/shorthand-properties.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/objectLiteralShorthandProperties/shorthand-properties.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/invalid.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/invalid.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/invalid.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/invalid.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/lowercase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/lowercase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/lowercase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/lowercase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/strict-uppercase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/strict-uppercase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/strict-uppercase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/strict-uppercase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/uppercase.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/uppercase.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/octalLiterals/uppercase.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/octalLiterals/uppercase.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/regex/regexp-simple.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/regex/regexp-simple.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/regex/regexp-simple.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/regex/regexp-simple.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-extended-escape.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-extended-escape.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-invalid-extended-escape.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-invalid-extended-escape.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-simple.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-simple.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexUFlag/regex-u-simple.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexUFlag/regex-u-simple.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexYFlag/regexp-y-simple.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexYFlag/regexp-y-simple.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/regexYFlag/regexp-y-simple.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/regexYFlag/regexp-y-simple.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/basic-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/basic-rest.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/basic-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/basic-rest.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/class-constructor.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/class-constructor.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/class-constructor.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/class-constructor.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/class-method.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/class-method.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/class-method.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/class-method.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/error-no-default.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/error-no-default.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/error-no-default.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/error-no-default.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/error-not-last.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/error-not-last.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/error-not-last.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/error-not-last.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/func-expression-multi.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/func-expression-multi.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/func-expression-multi.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/func-expression-multi.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/func-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/func-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/func-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/func-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/invalid-rest-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/invalid-rest-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/invalid-rest-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/invalid-rest-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/single-rest.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/single-rest.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/restParams/single-rest.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/restParams/single-rest.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-float-negative.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-float-negative.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-float-negative.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-float-negative.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-float.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-float.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-float.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-float.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-null.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-null.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-null.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-null.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-number-negative.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-number-negative.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-number-negative.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-number-negative.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-number.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-number.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-number.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-number.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-string.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-string.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-string.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-string.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-undefined.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-undefined.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/simple-literals/literal-undefined.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/simple-literals/literal-undefined.src.js diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/complex-spread.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/complex-spread.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/javascript/spread/complex-spread.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/complex-spread.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/error-invalid-if.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/error-invalid-if.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/error-invalid-if.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/error-invalid-if.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/error-invalid-sequence.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/error-invalid-sequence.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/error-invalid-sequence.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/error-invalid-sequence.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/multi-function-call.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/multi-function-call.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/multi-function-call.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/multi-function-call.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/not-final-param.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/not-final-param.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/not-final-param.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/not-final-param.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/simple-function-call.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/simple-function-call.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/spread/simple-function-call.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/spread/simple-function-call.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/deeply-nested.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/deeply-nested.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/deeply-nested.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/deeply-nested.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/error-octal-literal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/error-octal-literal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/error-octal-literal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/error-octal-literal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/escape-characters.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/escape-characters.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/escape-characters.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/escape-characters.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/expressions.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/expressions.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/expressions.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/expressions.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/multi-line-template-string.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/multi-line-template-string.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/multi-line-template-string.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/multi-line-template-string.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/simple-template-string.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/simple-template-string.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/simple-template-string.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/simple-template-string.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/single-dollar-sign.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/single-dollar-sign.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/single-dollar-sign.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/single-dollar-sign.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/tagged-no-placeholders.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/tagged-no-placeholders.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/tagged-template-string.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/tagged-template-string.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/templateStrings/tagged-template-string.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/templateStrings/tagged-template-string.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/basic-string-literal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/basic-string-literal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/complex-string-literal.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/complex-string-literal.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-empty-escape.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-empty-escape.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-too-large-escape.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-too-large-escape.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx-useJSXTextNode/test-content.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx-useJSXTextNode/test-content.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx-useJSXTextNode/test-content.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx-useJSXTextNode/test-content.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/attributes.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/attributes.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/attributes.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/attributes.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/element-keyword-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/element-keyword-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/element-keyword-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/element-keyword-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-conditional.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-conditional.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-conditional.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-conditional.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-invalid-js-identifier.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-invalid-js-identifier.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-invalid-js-identifier.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-invalid-js-identifier.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-tags.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-tags.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/embedded-tags.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/embedded-tags.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/empty-placeholder.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/empty-placeholder.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/empty-placeholder.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/empty-placeholder.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/escape-patterns.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/escape-patterns.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/escape-patterns.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/escape-patterns.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-attribute-missing-equals.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-attribute-missing-equals.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-attribute-missing-equals.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-attribute-missing-equals.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-attribute.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-attribute.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-attribute.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-attribute.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-broken-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-broken-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-broken-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-broken-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-computed-end-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-computed-end-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-computed-end-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-computed-end-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-computed-string-end-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-computed-string-end-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-computed-string-end-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-computed-string-end-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-embedded-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-embedded-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-embedded-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-embedded-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-leading-dot-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-leading-dot-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-leading-dot-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-leading-dot-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-closing-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-closing-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-closing-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-closing-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-closing-tags.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-closing-tags.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-closing-tags.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-closing-tags.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-namespace-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-namespace-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-mismatched-namespace-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-mismatched-namespace-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-closing-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-closing-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-closing-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-closing-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-namespace-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-namespace-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-namespace-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-namespace-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-namespace-value.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-namespace-value.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-namespace-value.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-namespace-value.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-spread-operator.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-spread-operator.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-missing-spread-operator.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-missing-spread-operator.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-namespace-name-with-docts.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-namespace-name-with-docts.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-namespace-name-with-docts.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-namespace-name-with-docts.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-namespace-value-with-dots.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-namespace-value-with-dots.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-namespace-value-with-dots.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-namespace-value-with-dots.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-common-parent-with-comment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-common-parent-with-comment.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-common-parent-with-comment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-common-parent-with-comment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-common-parent.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-common-parent.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-common-parent.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-common-parent.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-no-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-no-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-trailing-dot-tag-name.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-trailing-dot-tag-name.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-trailing-dot-tag-name.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-trailing-dot-tag-name.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-unexpected-comma.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-unexpected-comma.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/invalid-unexpected-comma.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/invalid-unexpected-comma.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/japanese-characters.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/japanese-characters.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/japanese-characters.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/japanese-characters.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/less-than-operator.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/less-than-operator.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/less-than-operator.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/less-than-operator.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/member-expression-this.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/member-expression-this.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/member-expression-this.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/member-expression-this.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/member-expression.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/member-expression.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/member-expression.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/member-expression.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/multiple-blank-spaces.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/multiple-blank-spaces.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/multiple-blank-spaces.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/multiple-blank-spaces.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/namespaced-name-and-attribute.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/namespaced-name-and-attribute.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/namespaced-name-and-attribute.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/namespaced-name-and-attribute.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/newslines-and-entities.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/newslines-and-entities.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/newslines-and-entities.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/newslines-and-entities.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag-inside-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag-inside-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag-inside-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag-inside-tag.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag-with-newline.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag-with-newline.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag-with-newline.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag-with-newline.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/self-closing-tag.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/self-closing-tag.src.js diff --git a/packages/typescript-estree/tests/fixtures/jsx/shorthand-fragment-with-child.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/shorthand-fragment-with-child.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/jsx/shorthand-fragment-with-child.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/shorthand-fragment-with-child.src.js diff --git a/packages/typescript-estree/tests/fixtures/jsx/shorthand-fragment.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/shorthand-fragment.src.js similarity index 100% rename from packages/typescript-estree/tests/fixtures/jsx/shorthand-fragment.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/shorthand-fragment.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/spread-child.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-child.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/spread-child.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-child.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/spread-operator-attributes.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-operator-attributes.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/spread-operator-attributes.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/spread-operator-attributes.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/tag-names-with-dots.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/tag-names-with-dots.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/tag-names-with-dots.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/tag-names-with-dots.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/tag-names-with-multi-dots.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/tag-names-with-multi-dots.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/tag-names-with-multi-dots.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/tag-names-with-multi-dots.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/test-content.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/test-content.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/test-content.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/test-content.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/trailing-spread-operator-attribute.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/trailing-spread-operator-attribute.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/trailing-spread-operator-attribute.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/trailing-spread-operator-attribute.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/jsx/unknown-escape-pattern.src.js b/packages/typescript-eslint-shared-fixtures/fixtures/jsx/unknown-escape-pattern.src.js similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/jsx/unknown-escape-pattern.src.js rename to packages/typescript-eslint-shared-fixtures/fixtures/jsx/unknown-escape-pattern.src.js diff --git a/packages/typescript-eslint-parser/tests/fixtures/tsx/generic-jsx-element.src.tsx b/packages/typescript-eslint-shared-fixtures/fixtures/tsx/generic-jsx-element.src.tsx similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/tsx/generic-jsx-element.src.tsx rename to packages/typescript-eslint-shared-fixtures/fixtures/tsx/generic-jsx-element.src.tsx diff --git a/packages/typescript-eslint-parser/tests/fixtures/tsx/react-typed-props.src.tsx b/packages/typescript-eslint-shared-fixtures/fixtures/tsx/react-typed-props.src.tsx similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/tsx/react-typed-props.src.tsx rename to packages/typescript-eslint-shared-fixtures/fixtures/tsx/react-typed-props.src.tsx diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/babylon-convergence/type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/babylon-convergence/type-parameters.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/babylon-convergence/type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/babylon-convergence/type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-interface.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-interface.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/abstract-interface.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/abstract-interface.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/async-function-expression.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/async-function-expression.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/async-function-expression.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/async-function-expression.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/async-function-with-var-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/async-function-with-var-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/async-function-with-var-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/async-function-with-var-declaration.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/call-signatures-with-generics.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/call-signatures-with-generics.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/call-signatures.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/call-signatures.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/call-signatures.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/call-signatures.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-expression.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-expression.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-expression.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-expression.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-multi-assign.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-multi-assign.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-multi.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-multi.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-multi.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-multi.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-operator.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-operator.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-operator.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-operator.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-simple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-simple.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/cast-as-simple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/cast-as-simple.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-multi-line-keyword-abstract.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-multi-line-keyword-abstract.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-multi-line-keyword-abstract.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-multi-line-keyword-abstract.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-multi-line-keyword-declare.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-multi-line-keyword-declare.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-multi-line-keyword-declare.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-multi-line-keyword-declare.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-modifier.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-modifier.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-modifier.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-modifier.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-return-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-return-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-return-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-return-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-type-parameters.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-constructor-and-type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-definite-assignment.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-definite-assignment.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-definite-assignment.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-definite-assignment.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-and-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-and-implements.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-and-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-and-implements.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-generic.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-extends-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-extends-generic.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-generic-method-default.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-generic-method-default.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-generic-method-default.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-generic-method-default.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-generic-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-generic-method.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-generic-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-generic-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-and-extends.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-and-extends.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-and-extends.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-and-extends.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-generic.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements-generic.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-implements.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-method.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-method.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-mixin-reference.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-mixin-reference.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-mixin.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-mixin.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-mixin.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-mixin.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-computed-property.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-computed-property.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-computed-property.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-computed-property.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-methods.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-methods.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-methods.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-property-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-property-function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-property-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-property-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-property-values.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-property-values.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-property-values.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-property-values.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-readonly-property.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-readonly-property.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-readonly-property.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-readonly-property.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-two-methods-computed-constructor.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-two-methods-computed-constructor.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/class-with-two-methods-computed-constructor.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-two-methods-computed-constructor.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter-default.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter-default.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter-default.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter-default.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/class-with-type-parameter.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/class-with-type-parameter.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/const-enum.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/const-enum.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/const-enum.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/const-enum.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/declare-class-with-optional-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/declare-class-with-optional-method.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/declare-class-with-optional-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/declare-class-with-optional-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/declare-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/declare-function.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/declare-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/declare-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-nested.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-nested.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-object.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-object.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-property.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment-property.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/destructuring-assignment.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/destructuring-assignment.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/destructuring-assignment.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/directive-in-module.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/directive-in-module.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/directive-in-module.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/directive-in-module.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/directive-in-namespace.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/directive-in-namespace.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/directive-in-namespace.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/directive-in-namespace.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-as-namespace.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-as-namespace.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/export-as-namespace.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-as-namespace.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-assignment.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-assignment.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-assignment.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-assignment.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-declare-const-named-enum.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-declare-const-named-enum.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/export-declare-const-named-enum.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-declare-const-named-enum.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-declare-named-enum.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-declare-named-enum.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/export-declare-named-enum.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-declare-named-enum.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-class-with-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-default-class-with-generic.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-class-with-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-default-class-with-generic.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-class-with-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-class-with-generic.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-class-with-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-class-with-generic.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-enum.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-enum.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-named-enum.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-named-enum.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-alias-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-alias-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-alias-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-alias-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-class-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-class-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-class-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-class-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-function-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-function-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/export-type-function-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/export-type-function-declaration.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-overloads.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-overloads.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/function-overloads.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-overloads.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-await.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-await.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-await.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-await.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-types-assignation.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-types-assignation.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-types-assignation.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-types-assignation.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-types.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-types.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/function-with-types.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/function-with-types.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/import-equal-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-equal-declaration.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/import-equal-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-equal-declaration.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-export-equal-declaration.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-export-equal-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/import-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-type.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/import-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/import-type.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-extends-multiple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-extends-multiple.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-extends-multiple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-extends-multiple.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-extends.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-extends.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-extends.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-extends.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-type-parameters.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-all-property-types.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-all-property-types.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-all-property-types.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-all-property-types.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-extends-member-expression.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-extends-member-expression.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-extends-member-expression.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-extends-member-expression.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-generic.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-generic.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-jsdoc.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-jsdoc.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-jsdoc.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-jsdoc.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-method.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-optional-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-optional-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-with-optional-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-with-optional-properties.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-without-type-annotation.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-without-type-annotation.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/interface-without-type-annotation.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/interface-without-type-annotation.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/keyof-operator.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/keyof-operator.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/keyof-operator.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/keyof-operator.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/nested-type-arguments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/nested-type-arguments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/nested-type-arguments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/nested-type-arguments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/never-type-param.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/never-type-param.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/never-type-param.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/never-type-param.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/non-null-assertion-operator.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/non-null-assertion-operator.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/non-null-assertion-operator.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/non-null-assertion-operator.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/object-with-escaped-properties.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/object-with-escaped-properties.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/object-with-escaped-properties.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/object-with-escaped-properties.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/object-with-typed-methods.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/object-with-typed-methods.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/object-with-typed-methods.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/object-with-typed-methods.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/parenthesized-use-strict.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/parenthesized-use-strict.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/parenthesized-use-strict.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/parenthesized-use-strict.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/symbol-type-param.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/symbol-type-param.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/symbol-type-param.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/symbol-type-param.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-assertion-arrow-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-assertion-arrow-function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-assertion-arrow-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-assertion-arrow-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-assertion.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-assertion.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-assertion.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-assertion.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-interface.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-interface.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-interface.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-interface.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-method.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-method.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/type-guard-in-method.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-guard-in-method.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-parameters-comments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-parameters-comments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-parameters-comments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-parameters-comments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-reference-comments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-reference-comments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/type-reference-comments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/type-reference-comments.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-bigint.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-bigint.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-boolean.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-boolean.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-false.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-false.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-false.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-false.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-never.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-never.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-never.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-never.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-null.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-null.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-null.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-null.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-number.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-number.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-number.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-number.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-object.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-object.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-object.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-object.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-string.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-string.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-string.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-string.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-symbol.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-symbol.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-true.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-true.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-true.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-true.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-undefined.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-undefined.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-unknown.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-unknown.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-void.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-void.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-keyword-void.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-keyword-void.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-method-signature.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-method-signature.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/typed-method-signature.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-method-signature.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/typed-this.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-this.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/typed-this.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/typed-this.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/unique-symbol.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/unique-symbol.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/unique-symbol.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/unique-symbol.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/unknown-type-annotation.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/unknown-type-annotation.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/basics/unknown-type-annotation.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/unknown-type-annotation.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-definite-assignment.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-definite-assignment.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-definite-assignment.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-definite-assignment.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-dotted-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-dotted-type.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-dotted-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-dotted-type.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-type.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/var-with-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/var-with-type.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/abstract-class.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/abstract-class.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/abstract-class.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/abstract-class.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/class.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/class.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/class.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/class.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/enum.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/enum.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/enum.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/enum.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/interface.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/interface.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/interface.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/interface.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/module.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/module.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/module.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/module.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/namespace.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/namespace.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/namespace.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/namespace.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/type-alias.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/type-alias.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/type-alias.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/type-alias.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/declare/variable.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/variable.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/declare/variable.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/declare/variable.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-empty-extends.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-empty-extends.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-empty-extends.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-empty-extends.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-implements.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-implements.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-implements.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-implements.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-export.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-export.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-export.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-export.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-private.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-private.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-private.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-private.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-protected.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-protected.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-protected.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-protected.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-public.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-public.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-public.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-public.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-static.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-static.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-method-static.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-method-static.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-export.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-export.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-export.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-export.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-private.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-private.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-private.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-private.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-protected.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-protected.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-protected.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-protected.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-public.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-public.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-public.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-public.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-static.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-static.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-static.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-static.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/solo-const.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/solo-const.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/errorRecovery/solo-const.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/errorRecovery/solo-const.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/call-expression-type-arguments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/call-expression-type-arguments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/call-expression-type-arguments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/call-expression-type-arguments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/new-expression-type-arguments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/new-expression-type-arguments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/new-expression-type-arguments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/new-expression-type-arguments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts diff --git a/packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts similarity index 100% rename from packages/typescript-eslint-parser/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/array-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/array-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/array-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/array-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer-nested.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer-nested.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer-nested.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer-nested.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer-simple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer-simple.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer-simple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer-simple.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/conditional-infer.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-infer.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/conditional-with-null.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-with-null.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/conditional-with-null.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional-with-null.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/conditional.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/conditional.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/conditional.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/constructor-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-generic.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/constructor-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-generic.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/constructor-in-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-in-generic.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/constructor-in-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-in-generic.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/constructor-with-rest.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-with-rest.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/constructor-with-rest.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor-with-rest.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/constructor.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/constructor.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/constructor.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/function-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-generic.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/function-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-generic.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/function-in-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-in-generic.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/function-in-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-in-generic.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/function-with-rest.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-with-rest.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/function-with-rest.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-with-rest.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/function-with-this.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-with-this.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/function-with-this.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function-with-this.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/function.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/function.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/function.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/index-signature-readonly.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature-readonly.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/index-signature-readonly.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature-readonly.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/index-signature-without-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature-without-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/index-signature-without-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature-without-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/index-signature.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/index-signature.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/index-signature.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/indexed.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/indexed.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/indexed.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/indexed.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/intersection-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/intersection-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/intersection-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/intersection-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/literal-number-negative.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-number-negative.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/literal-number-negative.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-number-negative.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/literal-number.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-number.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/literal-number.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-number.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/literal-string.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-string.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/literal-string.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/literal-string.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly-minus.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly-minus.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly-minus.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly-minus.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly-plus.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly-plus.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly-plus.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly-plus.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/mapped-readonly.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped-readonly.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/mapped.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/mapped.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/mapped.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/nested-types.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/nested-types.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/nested-types.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/nested-types.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/parenthesized-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/parenthesized-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/parenthesized-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/parenthesized-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/reference-generic-nested.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference-generic-nested.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/reference-generic-nested.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference-generic-nested.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/reference-generic.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference-generic.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/reference-generic.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference-generic.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/reference.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/reference.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/reference.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/this-type-expanded.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/this-type-expanded.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/this-type-expanded.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/this-type-expanded.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/this-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/this-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/this-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/this-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/tuple-empty.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-empty.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/tuple-empty.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-empty.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/tuple-optional.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-optional.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/tuple-optional.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-optional.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/tuple-rest.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-rest.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/tuple-rest.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-rest.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/tuple-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/tuple-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple-type.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/tuple.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/tuple.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/tuple.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/type-literal.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/type-literal.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/type-literal.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/type-literal.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/type-operator.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/type-operator.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/type-operator.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/type-operator.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/typeof.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/typeof.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/typeof.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/typeof.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/union-intersection.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/union-intersection.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/union-intersection.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/union-intersection.src.ts diff --git a/packages/typescript-estree/tests/fixtures/typescript/types/union-type.src.ts b/packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/union-type.src.ts similarity index 100% rename from packages/typescript-estree/tests/fixtures/typescript/types/union-type.src.ts rename to packages/typescript-eslint-shared-fixtures/fixtures/typescript/types/union-type.src.ts diff --git a/packages/typescript-eslint-shared-fixtures/package.json b/packages/typescript-eslint-shared-fixtures/package.json new file mode 100644 index 000000000000..dfb21239d0cf --- /dev/null +++ b/packages/typescript-eslint-shared-fixtures/package.json @@ -0,0 +1,5 @@ +{ + "name": "@typescript-eslint/shared-fixtures", + "version": "0.0.0", + "private": true +} diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 7aa6d6f9aaf3..1c13c2604bc2 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -39,6 +39,7 @@ "typescript": "*" }, "devDependencies": { + "@typescript-eslint/shared-fixtures": "*", "typescript": "~3.2.1" } } diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index 6ead060e9518..8b3ec98a2f93 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -13,6 +13,7 @@ interface Fixture { interface FixturePatternConfig { pattern: string; jsx: boolean; + directory: string; ignoreSourceType: boolean; } @@ -23,6 +24,10 @@ interface CreateFixturePatternConfig { } const fixturesDirPath = path.join(__dirname, '../fixtures'); +const sharedFixturesDirPath = path.join( + __dirname, + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures' +); class FixturesTester { protected fixtures: FixturePatternConfig[] = []; @@ -40,13 +45,17 @@ class FixturesTester { fixturesSubPath: string, config: CreateFixturePatternConfig = {} ) { + let _fixturesDirPath = fixturesDirPath; if (!fs.existsSync(path.join(fixturesDirPath, fixturesSubPath))) { - throw new Error( - `Registered path '${path.join( - __dirname, - fixturesSubPath - )}' was not found` - ); + _fixturesDirPath = sharedFixturesDirPath; + if (!fs.existsSync(path.join(sharedFixturesDirPath, fixturesSubPath))) { + throw new Error( + `Registered path '${path.join( + __dirname, + fixturesSubPath + )}' was not found` + ); + } } const ignore = config.ignore || []; @@ -67,6 +76,7 @@ class FixturesTester { // It needs to be the full path from within fixtures/ for the pattern pattern: `${fixturesSubPath}/${fixture}.src.${fileType}`, ignoreSourceType: true, + directory: _fixturesDirPath, jsx }); } @@ -75,15 +85,16 @@ class FixturesTester { this.fixtures.push({ pattern: `${fixturesSubPath}/!(${ignore.join('|')}).src.${fileType}`, ignoreSourceType: false, + directory: _fixturesDirPath, jsx }); } public getFixtures(): Fixture[] { - return this.fixtures + const fixtures = this.fixtures .map(fixture => glob - .sync(`${fixturesDirPath}/${fixture.pattern}`, {}) + .sync(`${fixture.directory}/${fixture.pattern}`, {}) .map(filename => ({ filename, ignoreSourceType: fixture.ignoreSourceType, @@ -91,6 +102,8 @@ class FixturesTester { })) ) .reduce((acc, x) => acc.concat(x), []); + + return fixtures; } } diff --git a/packages/typescript-estree/tests/fixtures/comments/block-trailing-comment.src.js b/packages/typescript-estree/tests/fixtures/comments/block-trailing-comment.src.js deleted file mode 100644 index 2a6819ff0b13..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/block-trailing-comment.src.js +++ /dev/null @@ -1,4 +0,0 @@ -{ - a(); - //comment -} diff --git a/packages/typescript-estree/tests/fixtures/comments/comment-within-condition.src.js b/packages/typescript-estree/tests/fixtures/comments/comment-within-condition.src.js deleted file mode 100644 index b997605defc4..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/comment-within-condition.src.js +++ /dev/null @@ -1,2 +0,0 @@ -/* foo */ -if (/* bar */ a) {} diff --git a/packages/typescript-estree/tests/fixtures/comments/export-default-anonymous-class.src.js b/packages/typescript-estree/tests/fixtures/comments/export-default-anonymous-class.src.js deleted file mode 100644 index d0a26e4ede9e..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/export-default-anonymous-class.src.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * this is anonymous class. - */ -export default class { - /** - * this is method1. - */ - method1(){ - } -} diff --git a/packages/typescript-estree/tests/fixtures/comments/jsdoc-comment.src.js b/packages/typescript-estree/tests/fixtures/comments/jsdoc-comment.src.js deleted file mode 100644 index 29298a12b52f..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/jsdoc-comment.src.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This is a function. - * @param {String} bar some string - * @returns {String} returns bar - */ -function foo(bar) { - return bar; -} diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-block-comment.src.js b/packages/typescript-estree/tests/fixtures/comments/jsx-block-comment.src.js deleted file mode 100644 index 5abfb88e92f2..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/jsx-block-comment.src.js +++ /dev/null @@ -1,7 +0,0 @@ -const pure = () => { - return ( - - {/*COMMENT*/} - - ); -} diff --git a/packages/typescript-estree/tests/fixtures/comments/jsx-tag-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/jsx-tag-comments.src.js deleted file mode 100644 index ef679a1ad20e..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/jsx-tag-comments.src.js +++ /dev/null @@ -1,10 +0,0 @@ -const pure = () => { - return ( - - - ); -} - diff --git a/packages/typescript-estree/tests/fixtures/comments/line-comment-with-block-syntax.src.js b/packages/typescript-estree/tests/fixtures/comments/line-comment-with-block-syntax.src.js deleted file mode 100644 index 88994dd62b4a..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/line-comment-with-block-syntax.src.js +++ /dev/null @@ -1 +0,0 @@ -// /*test*/ diff --git a/packages/typescript-estree/tests/fixtures/comments/mix-line-and-block-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/mix-line-and-block-comments.src.js deleted file mode 100644 index c49bcf6bcad6..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/mix-line-and-block-comments.src.js +++ /dev/null @@ -1,3 +0,0 @@ -//foo -var zzz /*aaa*/ = 777; -//bar diff --git a/packages/typescript-estree/tests/fixtures/comments/no-comment-regex.src.js b/packages/typescript-estree/tests/fixtures/comments/no-comment-regex.src.js deleted file mode 100644 index c33c7617e144..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/no-comment-regex.src.js +++ /dev/null @@ -1 +0,0 @@ -const regex = /no comment\/**foo/; diff --git a/packages/typescript-estree/tests/fixtures/comments/no-comment-template.src.js b/packages/typescript-estree/tests/fixtures/comments/no-comment-template.src.js deleted file mode 100644 index f22e6f94cf4f..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/no-comment-template.src.js +++ /dev/null @@ -1 +0,0 @@ -const str = `${__dirname}/test/*.js`; diff --git a/packages/typescript-estree/tests/fixtures/comments/surrounding-call-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/surrounding-call-comments.src.js deleted file mode 100644 index 6cbc4bf61de5..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/surrounding-call-comments.src.js +++ /dev/null @@ -1,5 +0,0 @@ -function a() { - /* before */ - foo(); - /* after */ -} diff --git a/packages/typescript-estree/tests/fixtures/comments/surrounding-debugger-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/surrounding-debugger-comments.src.js deleted file mode 100644 index b292546b44fb..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/surrounding-debugger-comments.src.js +++ /dev/null @@ -1,5 +0,0 @@ -function a() { - /* before */ - debugger; - /* after */ -} diff --git a/packages/typescript-estree/tests/fixtures/comments/surrounding-return-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/surrounding-return-comments.src.js deleted file mode 100644 index ae67152408fb..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/surrounding-return-comments.src.js +++ /dev/null @@ -1,5 +0,0 @@ -function a() { - /* before */ - return; - /* after */ -} diff --git a/packages/typescript-estree/tests/fixtures/comments/surrounding-throw-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/surrounding-throw-comments.src.js deleted file mode 100644 index 0ebc974917b4..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/surrounding-throw-comments.src.js +++ /dev/null @@ -1,5 +0,0 @@ -function a() { - /* before */ - throw 55; - /* after */ -} diff --git a/packages/typescript-estree/tests/fixtures/comments/surrounding-while-loop-comments.src.js b/packages/typescript-estree/tests/fixtures/comments/surrounding-while-loop-comments.src.js deleted file mode 100644 index 2134f68be4fe..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/surrounding-while-loop-comments.src.js +++ /dev/null @@ -1 +0,0 @@ -function f() { /* infinite */ while (true) { } /* bar */ var each; } diff --git a/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment-in-function.src.js b/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment-in-function.src.js deleted file mode 100644 index e71465ae63f7..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment-in-function.src.js +++ /dev/null @@ -1,9 +0,0 @@ -function bar(foo) { - switch(foo) { - // foo - case 1: - // falls through - case 2: - doIt(); - } -} diff --git a/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment.src.js b/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment.src.js deleted file mode 100644 index 3b8bb8eed40d..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/switch-fallthrough-comment.src.js +++ /dev/null @@ -1,7 +0,0 @@ -switch(foo) { - // foo - case 1: - // falls through - case 2: - doIt(); -} diff --git a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-function.src.js b/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-function.src.js deleted file mode 100644 index 80983bd211ab..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-function.src.js +++ /dev/null @@ -1,9 +0,0 @@ -function bar(a) { - switch (a) { - case 2: - break; - case 1: - break; - //no default - } -} diff --git a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js b/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js deleted file mode 100644 index 03508aea0a72..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment-in-nested-functions.src.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function(context) { - - function isConstant(node) { - switch (node.type) { - case "SequenceExpression": - return isConstant(node.expressions[node.expressions.length - 1]); - // no default - } - return false; - } - -}; diff --git a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment.src.js b/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment.src.js deleted file mode 100644 index 5febe2bccac5..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/switch-no-default-comment.src.js +++ /dev/null @@ -1,5 +0,0 @@ -switch (a) { - case 1: - break; - //no default -} diff --git a/packages/typescript-estree/tests/fixtures/comments/template-string-block.src.js b/packages/typescript-estree/tests/fixtures/comments/template-string-block.src.js deleted file mode 100644 index 19351f45e710..000000000000 --- a/packages/typescript-estree/tests/fixtures/comments/template-string-block.src.js +++ /dev/null @@ -1,5 +0,0 @@ -`${name}`; -{ - /* TODO comment comment comment */ - 1 + 1; -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param-with-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param-with-params.src.js deleted file mode 100644 index 248cc450ad83..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param-with-params.src.js +++ /dev/null @@ -1 +0,0 @@ -foo((x, y) => {}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param.src.js deleted file mode 100644 index fffb35c56227..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/as-param.src.js +++ /dev/null @@ -1 +0,0 @@ -foo(() => {}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js deleted file mode 100644 index 5549093124c0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js +++ /dev/null @@ -1,2 +0,0 @@ -(a => ({})) + 1; -((a => ({})) + 1); diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic.src.js deleted file mode 100644 index ad0d3df63fe9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/basic.src.js +++ /dev/null @@ -1 +0,0 @@ -() => "test"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body-not-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body-not-object.src.js deleted file mode 100644 index 5ee5169b312b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body-not-object.src.js +++ /dev/null @@ -1 +0,0 @@ -e => { label: 42 }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body.src.js deleted file mode 100644 index f7902e3a3386..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/block-body.src.js +++ /dev/null @@ -1 +0,0 @@ -e => { 42; }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-dup-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-dup-params.src.js deleted file mode 100644 index 38395bd1c5d0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-dup-params.src.js +++ /dev/null @@ -1 +0,0 @@ -(a, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-missing-paren.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-missing-paren.src.js deleted file mode 100644 index e17b13c8d6da..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-missing-paren.src.js +++ /dev/null @@ -1 +0,0 @@ -(a, (b)) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-not-arrow.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-not-arrow.src.js deleted file mode 100644 index 72cbc0fc5d85..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-not-arrow.src.js +++ /dev/null @@ -1 +0,0 @@ -left = (aSize.width/2) - () \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js deleted file mode 100644 index e4b6d3900abb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -(10, 20) => 0; diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param.src.js deleted file mode 100644 index 0ce82a509cb3..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-numeric-param.src.js +++ /dev/null @@ -1 +0,0 @@ -(10) => 0; diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js deleted file mode 100644 index 31aa8cee2ae4..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js +++ /dev/null @@ -1 +0,0 @@ -() <= 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js deleted file mode 100644 index 4f8c006ac014..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (eval = 10) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js deleted file mode 100644 index f93258b365f4..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (a, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js deleted file mode 100644 index 4a9a5d2c3010..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (eval) => 42 \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval.src.js deleted file mode 100644 index 6bba987d7e07..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-eval.src.js +++ /dev/null @@ -1 +0,0 @@ -(eval) => { "use strict"; 42 } \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-octal.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-octal.src.js deleted file mode 100644 index e199dc28811f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-octal.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (a) => 00; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js deleted file mode 100644 index 15617f88e041..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (arguments, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js deleted file mode 100644 index 672a5206c66d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (eval, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js deleted file mode 100644 index 672a5206c66d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (eval, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js deleted file mode 100644 index 40c40bf9436f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; arguments => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js deleted file mode 100644 index 87f875602b53..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; eval => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-two-lines.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-two-lines.src.js deleted file mode 100644 index 22213ad116bc..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-two-lines.src.js +++ /dev/null @@ -1,2 +0,0 @@ -var a = () - => 0; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js deleted file mode 100644 index 77cf2b5b8381..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js +++ /dev/null @@ -1 +0,0 @@ -((a)) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/expression.src.js deleted file mode 100644 index 046e74ece9c3..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/expression.src.js +++ /dev/null @@ -1 +0,0 @@ -(x => x); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/iife.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/iife.src.js deleted file mode 100644 index 37a088a0f158..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/iife.src.js +++ /dev/null @@ -1 +0,0 @@ -e => ({ property: 42 }); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/multiple-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/multiple-params.src.js deleted file mode 100644 index 26ac16e44cfa..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/multiple-params.src.js +++ /dev/null @@ -1 +0,0 @@ -(a, b) => "test"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/no-auto-return.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/no-auto-return.src.js deleted file mode 100644 index 2c9dd12d0481..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/no-auto-return.src.js +++ /dev/null @@ -1 +0,0 @@ -(a, b) => { 42; }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js deleted file mode 100644 index 7ea5c0a45076..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js +++ /dev/null @@ -1 +0,0 @@ -arguments => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js deleted file mode 100644 index 5a51236aa6f8..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js +++ /dev/null @@ -1 +0,0 @@ -(eval, a) => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval.src.js deleted file mode 100644 index db0c68fe0aef..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-eval.src.js +++ /dev/null @@ -1 +0,0 @@ -eval => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-octal.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-octal.src.js deleted file mode 100644 index 0e6918d7d43c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/not-strict-octal.src.js +++ /dev/null @@ -1 +0,0 @@ -(a) => 00; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-arrow-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-arrow-function.src.js deleted file mode 100644 index 535922a77760..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-arrow-function.src.js +++ /dev/null @@ -1 +0,0 @@ -x => y => 42; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-sequence.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-sequence.src.js deleted file mode 100644 index ee165aec01a0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/return-sequence.src.js +++ /dev/null @@ -1 +0,0 @@ -(x) => ((y, z) => (x, y, z)); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-parens.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-parens.src.js deleted file mode 100644 index cf5e9932c5e7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-parens.src.js +++ /dev/null @@ -1 +0,0 @@ -(e) => "test"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js deleted file mode 100644 index fdbaa2c998ee..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js +++ /dev/null @@ -1 +0,0 @@ -(sun) => earth; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param.src.js deleted file mode 100644 index 49a04ad0bcf9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/arrowFunctions/single-param.src.js +++ /dev/null @@ -1 +0,0 @@ -e => "test"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/binary.src.js b/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/binary.src.js deleted file mode 100644 index 2b138015de5e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/binary.src.js +++ /dev/null @@ -1 +0,0 @@ -0b1n; diff --git a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/decimal.src.js b/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/decimal.src.js deleted file mode 100644 index fe03424dbb56..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/decimal.src.js +++ /dev/null @@ -1 +0,0 @@ -1n; diff --git a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/hex.src.js b/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/hex.src.js deleted file mode 100644 index 204f239e3696..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/hex.src.js +++ /dev/null @@ -1 +0,0 @@ -0x1n; diff --git a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/octal.src.js b/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/octal.src.js deleted file mode 100644 index f2ce84fefe08..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/bigIntLiterals/octal.src.js +++ /dev/null @@ -1 +0,0 @@ -0o1n; diff --git a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/invalid.src.js b/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/invalid.src.js deleted file mode 100644 index 719fc33cbe40..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/invalid.src.js +++ /dev/null @@ -1 +0,0 @@ -0b102; diff --git a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/lowercase.src.js b/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/lowercase.src.js deleted file mode 100644 index edde9a3b5977..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/lowercase.src.js +++ /dev/null @@ -1 +0,0 @@ -0b101; diff --git a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/uppercase.src.js b/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/uppercase.src.js deleted file mode 100644 index 9cb6f2fb1b5c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/binaryLiterals/uppercase.src.js +++ /dev/null @@ -1 +0,0 @@ -0B101; diff --git a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/const.src.js b/packages/typescript-estree/tests/fixtures/javascript/blockBindings/const.src.js deleted file mode 100644 index 70b0430bf3e2..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/const.src.js +++ /dev/null @@ -1 +0,0 @@ -const foo = bar; diff --git a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let-in-switchcase.src.js b/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let-in-switchcase.src.js deleted file mode 100644 index 5df03fa0b726..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let-in-switchcase.src.js +++ /dev/null @@ -1 +0,0 @@ -switch (answer) { case 42: let t = 42; break; } diff --git a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let.src.js b/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let.src.js deleted file mode 100644 index c85081ab6c40..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/blockBindings/let.src.js +++ /dev/null @@ -1 +0,0 @@ -let foo = bar; diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-accessor-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-accessor-properties.src.js deleted file mode 100644 index 5788395aaa33..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-accessor-properties.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {get a(){} set b(c){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-computed-static-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-computed-static-method.src.js deleted file mode 100644 index f960fe06cd30..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-computed-static-method.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static [a](){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-expression.src.js deleted file mode 100644 index ac7ea1bef0c9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -(class {}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-prototype.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-prototype.src.js deleted file mode 100644 index 5f8f86aeebe0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-prototype.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {prototype(){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-static.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-static.src.js deleted file mode 100644 index 4b8882f7305c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-static.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static(){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-with-space.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-with-space.src.js deleted file mode 100644 index 3e1360594e06..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-method-named-with-space.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {withSpace () {}} diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method-super.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method-super.src.js deleted file mode 100644 index 304405d389ef..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method-super.src.js +++ /dev/null @@ -1,5 +0,0 @@ -class A { - a(){ - super(); - } -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method.src.js deleted file mode 100644 index cbae5822e572..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-one-method.src.js +++ /dev/null @@ -1,3 +0,0 @@ -class A { - a(){} -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-prototype.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-prototype.src.js deleted file mode 100644 index 9a2019e9b33c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-prototype.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static ["prototype"](){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-static.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-static.src.js deleted file mode 100644 index 947d978d328b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method-named-static.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static static(){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method.src.js deleted file mode 100644 index dea98b8d153d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-method.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static a(){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js deleted file mode 100644 index 5efab6d986b6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static a(){} static get a(){} static set a(b){} }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-computed-static-methods.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-computed-static-methods.src.js deleted file mode 100644 index 8a3d1cf96ae8..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-computed-static-methods.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static[a](){}; static[b](){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js deleted file mode 100644 index 66a3500ba613..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {"constructor"(){} ["constructor"](){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-semi.src.js deleted file mode 100644 index eae3cf562544..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {a(){};b(){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-three-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-three-semi.src.js deleted file mode 100644 index db2c06ce65d4..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-three-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {;a(){};b(){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-two-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-two-semi.src.js deleted file mode 100644 index 30f2b72c83b6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods-two-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {a(){};b(){};}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods.src.js deleted file mode 100644 index b30e1d968e3c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-methods.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {a(){}b(){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js deleted file mode 100644 index 57bbee9df047..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {static constructor(){} static constructor(){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-parameters.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-parameters.src.js deleted file mode 100644 index 92ffc4912b13..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-parameters.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {constructor(foo, bar){}} diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-with-space.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-with-space.src.js deleted file mode 100644 index af3f316ec017..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor-with-space.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {constructor (){}}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor.src.js deleted file mode 100644 index 00fcd7be15ef..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/class-with-constructor.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {constructor(){}}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-assign-to-var.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-assign-to-var.src.js deleted file mode 100644 index fba446ff6e45..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-assign-to-var.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = class A extends 0{}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-expression.src.js deleted file mode 100644 index b5e6e62ea087..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/derived-class-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -(class extends 0{}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-double-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-double-semi.src.js deleted file mode 100644 index a650fd681397..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-double-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-semi.src.js deleted file mode 100644 index e14455cbb559..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {;}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class.src.js deleted file mode 100644 index a650fd681397..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-class.src.js +++ /dev/null @@ -1 +0,0 @@ -class A {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-literal-derived-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/empty-literal-derived-class.src.js deleted file mode 100644 index 5903f34f08bd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/empty-literal-derived-class.src.js +++ /dev/null @@ -1 +0,0 @@ -class A extends 0 {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-declaration.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-declaration.src.js deleted file mode 100644 index c3498222f8fa..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-declaration.src.js +++ /dev/null @@ -1 +0,0 @@ -class {}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-setter-declaration.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-setter-declaration.src.js deleted file mode 100644 index 98433ba8b00a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-setter-declaration.src.js +++ /dev/null @@ -1 +0,0 @@ -class A { set foo() {}}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-two-super-classes.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-two-super-classes.src.js deleted file mode 100644 index dbac127c0814..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/invalid-class-two-super-classes.src.js +++ /dev/null @@ -1 +0,0 @@ -class A extends B, C {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/named-class-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/named-class-expression.src.js deleted file mode 100644 index 9829e5d0ddd1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/named-class-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -(class A {}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/classes/named-derived-class-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/classes/named-derived-class-expression.src.js deleted file mode 100644 index cb8f8a94b99b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/classes/named-derived-class-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -(class A extends 0{}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-constructor.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-constructor.src.js deleted file mode 100644 index 901358c2f16c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-constructor.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - constructor(foo='bar') { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-method.src.js deleted file mode 100644 index cb113e755fff..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/class-method.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo(bar='baz') { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/declaration.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/declaration.src.js deleted file mode 100644 index 7885715f86b0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/declaration.src.js +++ /dev/null @@ -1 +0,0 @@ -function f(a = 1) {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/expression.src.js deleted file mode 100644 index 25993b363d55..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/expression.src.js +++ /dev/null @@ -1 +0,0 @@ -x = function(y = 1) {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/method.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/method.src.js deleted file mode 100644 index 2537287de022..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/method.src.js +++ /dev/null @@ -1 +0,0 @@ -x = { f: function(a=1) {} } \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/not-all-params.src.js b/packages/typescript-estree/tests/fixtures/javascript/defaultParams/not-all-params.src.js deleted file mode 100644 index 3bfab96a2698..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/defaultParams/not-all-params.src.js +++ /dev/null @@ -1 +0,0 @@ -var foo = function(a, b = 42, c) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js deleted file mode 100644 index c2f38722e62b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js +++ /dev/null @@ -1 +0,0 @@ -([y]) => x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js deleted file mode 100644 index 75bb19b495b8..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js +++ /dev/null @@ -1 +0,0 @@ -([y, [x]]) => x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js deleted file mode 100644 index c2a809e04a22..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js +++ /dev/null @@ -1 +0,0 @@ -({foo: y, a:{bar: x}}) => x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js deleted file mode 100644 index 177cd72468dd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js +++ /dev/null @@ -1 +0,0 @@ -({y, a:{x}}) => x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js deleted file mode 100644 index 7f6a1fb1436e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js +++ /dev/null @@ -1 +0,0 @@ -({y}) => x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js deleted file mode 100644 index 7fa2d1940626..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js +++ /dev/null @@ -1 +0,0 @@ -([x = 10]) => x \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js deleted file mode 100644 index 410eed8cc78f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js +++ /dev/null @@ -1 +0,0 @@ -({x = 10, y: { z = 10 }}) => [x, z] \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js deleted file mode 100644 index c6b403750620..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js +++ /dev/null @@ -1 +0,0 @@ -({x = 10}) => x \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js deleted file mode 100644 index 0ff51d044822..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -const [a] = []; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js deleted file mode 100644 index c705f581d5a1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -let [a] = []; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js deleted file mode 100644 index 67a0d1a4e9c7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js +++ /dev/null @@ -1 +0,0 @@ -const {a:b} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js deleted file mode 100644 index 80b78cb8d264..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -const {a} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js deleted file mode 100644 index 53b1654cb828..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js +++ /dev/null @@ -1 +0,0 @@ -let {a:b} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js deleted file mode 100644 index 51c02f8b6ed1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -let {a} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js deleted file mode 100644 index b233ca5bd452..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js +++ /dev/null @@ -1 +0,0 @@ -function f([x] = [1]) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js deleted file mode 100644 index 0821397f396c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js +++ /dev/null @@ -1 +0,0 @@ -({f({x} = {x: 10}) {}}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js deleted file mode 100644 index 753d7b471310..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js +++ /dev/null @@ -1 +0,0 @@ -f = function({x} = {x: 10}) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-forOf/loop.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-forOf/loop.src.js deleted file mode 100644 index 7751aeddd636..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-forOf/loop.src.js +++ /dev/null @@ -1 +0,0 @@ -for ([a] of foo); diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js deleted file mode 100644 index a14d109bf05d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -[{ a, b }, ...c] = d; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js deleted file mode 100644 index aa3e6bed2221..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js +++ /dev/null @@ -1 +0,0 @@ -[a, ...[b, c]] = d; diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js deleted file mode 100644 index 28bec5ed0b4e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js +++ /dev/null @@ -1 +0,0 @@ -function a([a, b, ...[ok]]) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js deleted file mode 100644 index eee98799d22b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js +++ /dev/null @@ -1 +0,0 @@ -[...c, { a, b }] = d; diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js deleted file mode 100644 index c7f6aa97b292..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -[a, ...b] = c; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/single-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/single-destructured.src.js deleted file mode 100644 index 0be6e5d967b2..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/single-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -[...a] = b; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js deleted file mode 100644 index dabf00dc6ecb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -var [{ a, b }, ...c] = d; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js deleted file mode 100644 index ed56a2030533..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js +++ /dev/null @@ -1 +0,0 @@ -var [a, ...[b, c]] = d; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js deleted file mode 100644 index 897bcba9d9b1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -var [a, ...b] = c; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js deleted file mode 100644 index e6dc8d642048..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js +++ /dev/null @@ -1 +0,0 @@ -var [...a] = b; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-member.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-member.src.js deleted file mode 100644 index ca7265689821..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-member.src.js +++ /dev/null @@ -1 +0,0 @@ -[ok.v] = 20; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-to-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-to-array.src.js deleted file mode 100644 index e03adeba1880..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-to-array.src.js +++ /dev/null @@ -1 +0,0 @@ -[a, b] = [b, a]; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-var-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-var-undefined.src.js deleted file mode 100644 index a802dde0d6b0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/array-var-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -var [a] = []; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-array.src.js deleted file mode 100644 index 8a926b84c4f1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-array.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - consturctor([foo, bar]) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js deleted file mode 100644 index 9afe8da6814b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - consturctor([foo=3, bar=4]) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js deleted file mode 100644 index c840ebe15cfb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - consturctor({foo=3, bar=4}) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-object.src.js deleted file mode 100644 index 49bb33c2b093..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-constructor-params-object.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - consturctor({foo, bar}) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-array.src.js deleted file mode 100644 index 93e433f196b4..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-array.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo([bar, baz]) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js deleted file mode 100644 index d11458520d7f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo([bar=3, baz=4]) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js deleted file mode 100644 index ff1eb4c59cf0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo({bar=3, baz=3}) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-object.src.js deleted file mode 100644 index 32683cf92773..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/class-method-params-object.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo({bar, baz}) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-all.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-all.src.js deleted file mode 100644 index 7fa55d7113f0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-all.src.js +++ /dev/null @@ -1 +0,0 @@ -var [x = 10, y = 5, z = 1] = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js deleted file mode 100644 index 7845a89ab06d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x: x, y: y, z: { a: a = 10} } = b; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-multi.src.js deleted file mode 100644 index e0030d18850c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var [x = 10, y, z] = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-all.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-all.src.js deleted file mode 100644 index 1925b1e2da93..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-all.src.js +++ /dev/null @@ -1 +0,0 @@ -var [x = 10, [ z = 10]] = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js deleted file mode 100644 index aa0c025c20aa..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var [x = 10, [ z ]] = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array.src.js deleted file mode 100644 index f95384c66e05..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-array.src.js +++ /dev/null @@ -1 +0,0 @@ -[x=10] = x \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-all.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-all.src.js deleted file mode 100644 index d56d776aabc7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-all.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x = 10, y = 5, z = 1} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-all.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-all.src.js deleted file mode 100644 index df414e99e402..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-all.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x: x = 10, y: y = 10, z: z = 10} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js deleted file mode 100644 index c48fc3b89460..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x: x, y: y = 10, z: z} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform.src.js deleted file mode 100644 index f030020d5c02..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-longform.src.js +++ /dev/null @@ -1 +0,0 @@ -var { x: x = 10 } = x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js deleted file mode 100644 index 3c186ea51cd9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x, y: y = 10, z} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-multi.src.js deleted file mode 100644 index 48796e029fb4..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x = 10, y, z} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-all.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-all.src.js deleted file mode 100644 index ebf4aa8a643d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-all.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x = 10, y: { z = 10}} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js deleted file mode 100644 index 603208cc936d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x = 10, y: { z }} = a; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object.src.js deleted file mode 100644 index 8735e3d0fe7a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/defaults-object.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x = 10} = x \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-array-catch.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-array-catch.src.js deleted file mode 100644 index e187c79d3822..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-array-catch.src.js +++ /dev/null @@ -1,7 +0,0 @@ -function x({a}) { - try { - var {b} = a; - } - catch([stack]) { - } -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-object-catch.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-object-catch.src.js deleted file mode 100644 index 2d2d277b17a6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/destructured-object-catch.src.js +++ /dev/null @@ -1,7 +0,0 @@ -function x({a}) { - try { - var {b} = a; - } - catch({stack}) { - } -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js deleted file mode 100644 index f4c0d85bef87..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js +++ /dev/null @@ -1 +0,0 @@ -({ Object=0, String=0 }) = {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/named-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/named-param.src.js deleted file mode 100644 index 5f3ddae50e29..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/named-param.src.js +++ /dev/null @@ -1 +0,0 @@ -({ responseText: text } = res); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-array.src.js deleted file mode 100644 index 1cf79a3aa752..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-array.src.js +++ /dev/null @@ -1 +0,0 @@ -var [x, , [, z]] = [1,2,[3,4]]; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-object.src.js deleted file mode 100644 index 3f6c5d2ec278..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/nested-object.src.js +++ /dev/null @@ -1 +0,0 @@ -var {x: y, z: { a: b } } = { x: "3", z: { a: "b" } }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-named.src.js deleted file mode 100644 index 8a2d98a6946a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-named.src.js +++ /dev/null @@ -1 +0,0 @@ -var {a:b} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-undefined.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-undefined.src.js deleted file mode 100644 index 945bf61102bd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/object-var-undefined.src.js +++ /dev/null @@ -1 +0,0 @@ -var {a} = {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-array.src.js deleted file mode 100644 index e2545e8519ac..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-array.src.js +++ /dev/null @@ -1 +0,0 @@ -function a([x = 10]) {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object-nested.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object-nested.src.js deleted file mode 100644 index baf01aa25d68..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object-nested.src.js +++ /dev/null @@ -1 +0,0 @@ -function a({x = 10, y: { z = 10 }}) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object.src.js deleted file mode 100644 index a18df31a40c6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/param-defaults-object.src.js +++ /dev/null @@ -1 +0,0 @@ -function a({x = 10}) {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array-wrapped.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array-wrapped.src.js deleted file mode 100644 index b623ac7f45b7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array-wrapped.src.js +++ /dev/null @@ -1 +0,0 @@ -(function x([ a, b ]){}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array.src.js deleted file mode 100644 index fda9c68945b0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-array.src.js +++ /dev/null @@ -1 +0,0 @@ -function x([ a, b ]){}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-multi-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-multi-object.src.js deleted file mode 100644 index 1b212bc385af..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-multi-object.src.js +++ /dev/null @@ -1 +0,0 @@ -function x(a, { b }){}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-array.src.js deleted file mode 100644 index 6544066786ea..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-array.src.js +++ /dev/null @@ -1 +0,0 @@ -function a([x, , [, z]]) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-object.src.js deleted file mode 100644 index 78e865b16bfd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-nested-object.src.js +++ /dev/null @@ -1 +0,0 @@ -function a({x: y, z: { a: b } }) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object-wrapped.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object-wrapped.src.js deleted file mode 100644 index c9f34398d78b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object-wrapped.src.js +++ /dev/null @@ -1 +0,0 @@ -(function x({ a, b }){}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object.src.js deleted file mode 100644 index 5a71f3507199..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/params-object.src.js +++ /dev/null @@ -1 +0,0 @@ -function x({ a, b }){}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/destructuring/sparse-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/destructuring/sparse-array.src.js deleted file mode 100644 index d17fce97a39b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/destructuring/sparse-array.src.js +++ /dev/null @@ -1 +0,0 @@ -[a,,b] = array; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js deleted file mode 100644 index 75fcd2647be0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js +++ /dev/null @@ -1,3 +0,0 @@ -async function* foo() { - -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js deleted file mode 100644 index 742ec47ad7ba..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js +++ /dev/null @@ -1,5 +0,0 @@ -async function foo() { - for await (const item of items) { - - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js deleted file mode 100644 index 18dff34f73a5..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js +++ /dev/null @@ -1 +0,0 @@ -import('foo').then(main); diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js deleted file mode 100644 index 99da0c5393ec..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js +++ /dev/null @@ -1 +0,0 @@ -function c({a, ...b}) {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js deleted file mode 100644 index 0caa3fab4a96..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js +++ /dev/null @@ -1 +0,0 @@ -({a, ...b} = {a, ...b}) diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js deleted file mode 100644 index 29fda8e4a120..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js +++ /dev/null @@ -1 +0,0 @@ -function foo({...bar}) { } diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js deleted file mode 100644 index 39ef542fe289..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -var { x, y, ...z, } = foo; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js deleted file mode 100644 index a38d92cf9298..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js +++ /dev/null @@ -1 +0,0 @@ -var { x, y, ...foo.bar } = { x: 1, y: 2, a: 3, b: 4 }; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js deleted file mode 100644 index 4d733791c65d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js +++ /dev/null @@ -1 +0,0 @@ -var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js deleted file mode 100644 index 1ef4ef44c8a6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js +++ /dev/null @@ -1,9 +0,0 @@ -var foo, - get, - set; - -var x = { - foo: foo, - get: get, - ...set.foo -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js deleted file mode 100644 index 4247e4a5494d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js +++ /dev/null @@ -1,5 +0,0 @@ -({ - initialize({someVar, otherVar, ...options}) { - // ... do some stuff with options ... - } -}); diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js deleted file mode 100644 index 2eb0d18f575b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js +++ /dev/null @@ -1,5 +0,0 @@ -var x = { - initialize({someVar, otherVar, ...options}) { - // ... do some stuff with options ... - } -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js deleted file mode 100644 index 11d8c39bfa8b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js +++ /dev/null @@ -1,9 +0,0 @@ -var foo, - get, - set; - -var x = { - foo, - get, - ...set -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js deleted file mode 100644 index e287012c47b9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js +++ /dev/null @@ -1,9 +0,0 @@ -var foo, - get, - set; - -var x = { - foo: foo, - get: get, - ...set -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js deleted file mode 100644 index a2841df60224..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -({ a, b, ...c, }) diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js deleted file mode 100644 index 85d5f34a0076..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js +++ /dev/null @@ -1,9 +0,0 @@ -var foo, - get, - set; - -var x = { - foo: foo, - ...get, - ...set -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js deleted file mode 100644 index 7ac791c528ec..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js +++ /dev/null @@ -1 +0,0 @@ -try {} catch {} finally {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js b/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js deleted file mode 100644 index 0c6986fd88c6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js +++ /dev/null @@ -1 +0,0 @@ -try {} catch {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/exponentiationOperators/exponential-operators.src.js b/packages/typescript-estree/tests/fixtures/javascript/exponentiationOperators/exponential-operators.src.js deleted file mode 100644 index b04a6f38a508..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/exponentiationOperators/exponential-operators.src.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = 2 ** 3; -x **= 4; diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-function-initializer.src.js b/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-function-initializer.src.js deleted file mode 100644 index be6ee7a07961..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-function-initializer.src.js +++ /dev/null @@ -1 +0,0 @@ -for (var i = function() { return 10 in [] } of list) process(x); diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js b/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js deleted file mode 100644 index 090dccf02df6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js +++ /dev/null @@ -1,3 +0,0 @@ -for (var x of foo) { - doSomething(); -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js b/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js deleted file mode 100644 index 3e0f665bcb3f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js +++ /dev/null @@ -1,2 +0,0 @@ -for (var x of foo) - doSomething(); diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js b/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js deleted file mode 100644 index 409abfa0c48b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js +++ /dev/null @@ -1,2 +0,0 @@ -for (const x of foo) - doSomething(); diff --git a/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js b/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js deleted file mode 100644 index 7d9d367e23a0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js +++ /dev/null @@ -1,2 +0,0 @@ -for (let x of foo) - doSomething(); diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/anonymous-generator.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/anonymous-generator.src.js deleted file mode 100644 index e582946f6565..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/anonymous-generator.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { yield v }); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-function.src.js deleted file mode 100644 index 59fbab7761a6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-function.src.js +++ /dev/null @@ -1,4 +0,0 @@ - -async function *foo() { - -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-method.src.js deleted file mode 100644 index 475794bf0c0b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/async-generator-method.src.js +++ /dev/null @@ -1,5 +0,0 @@ -class C { - async * f() { - const x = yield* g(); - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/double-yield.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/double-yield.src.js deleted file mode 100644 index e026a3373e9f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/double-yield.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { yield yield 10 }); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/empty-generator-declaration.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/empty-generator-declaration.src.js deleted file mode 100644 index 669935546a20..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/empty-generator-declaration.src.js +++ /dev/null @@ -1 +0,0 @@ -function* t() {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/generator-declaration.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/generator-declaration.src.js deleted file mode 100644 index 3690a57479ab..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/generator-declaration.src.js +++ /dev/null @@ -1 +0,0 @@ -function* test () { yield *v }; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-delegation.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/yield-delegation.src.js deleted file mode 100644 index fc14d64df717..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-delegation.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { yield *v }); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-in-call.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-in-call.src.js deleted file mode 100644 index d30055ca0870..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-in-call.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { fn(yield); }); diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-no-semi.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-no-semi.src.js deleted file mode 100644 index 5fc869289ee9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value-no-semi.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { yield }); diff --git a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value.src.js b/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value.src.js deleted file mode 100644 index 75c83be2ff92..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/generators/yield-without-value.src.js +++ /dev/null @@ -1 +0,0 @@ -(function* () { yield; }); diff --git a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-identifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-identifier.src.js deleted file mode 100644 index aa6758b0cd89..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-identifier.src.js +++ /dev/null @@ -1 +0,0 @@ -return fooz; diff --git a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-no-arg.src.js b/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-no-arg.src.js deleted file mode 100644 index f312410bd34c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-no-arg.src.js +++ /dev/null @@ -1 +0,0 @@ -return; diff --git a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-true.src.js b/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-true.src.js deleted file mode 100644 index c1c6922d1dfe..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/globalReturn/return-true.src.js +++ /dev/null @@ -1 +0,0 @@ -return true; diff --git a/packages/typescript-estree/tests/fixtures/javascript/importMeta/simple-import-meta.src.js b/packages/typescript-estree/tests/fixtures/javascript/importMeta/simple-import-meta.src.js deleted file mode 100644 index bd14f9431ae7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/importMeta/simple-import-meta.src.js +++ /dev/null @@ -1 +0,0 @@ -import.meta.url; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/error-delete.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/error-delete.src.js deleted file mode 100644 index eb6dc52a826d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/error-delete.src.js +++ /dev/null @@ -1,2 +0,0 @@ -import x from "x"; -delete x; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/error-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/error-function.src.js deleted file mode 100644 index cdc0cd394494..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/error-function.src.js +++ /dev/null @@ -1,4 +0,0 @@ -function x() { - export default friends; -} - diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/error-strict.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/error-strict.src.js deleted file mode 100644 index a17a321127ac..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/error-strict.src.js +++ /dev/null @@ -1,5 +0,0 @@ -import house from "house"; - -with (house) { - console.log(roof); -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-array.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-array.src.js deleted file mode 100644 index d6d1738de67e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-array.src.js +++ /dev/null @@ -1 +0,0 @@ -export default []; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-class.src.js deleted file mode 100644 index 3509c96a752f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-class.src.js +++ /dev/null @@ -1,3 +0,0 @@ -export default class { - -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-expression.src.js deleted file mode 100644 index f30c184a1ae0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -export default (1 + 2); diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-function.src.js deleted file mode 100644 index ea9b101e1c22..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-function.src.js +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-class.src.js deleted file mode 100644 index b2ded7d41d9d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-class.src.js +++ /dev/null @@ -1,3 +0,0 @@ -export default class Test { - -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-function.src.js deleted file mode 100644 index 386baca17315..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-named-function.src.js +++ /dev/null @@ -1 +0,0 @@ -export default function foo() {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-number.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-number.src.js deleted file mode 100644 index 7a4e8a723a40..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-number.src.js +++ /dev/null @@ -1 +0,0 @@ -export default 42; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-object.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-object.src.js deleted file mode 100644 index f8266ca25f5d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-object.src.js +++ /dev/null @@ -1 +0,0 @@ -export default { foo: 1 }; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-value.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-value.src.js deleted file mode 100644 index f7b318b3f637..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-default-value.src.js +++ /dev/null @@ -1 +0,0 @@ -export default foo; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-batch.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-batch.src.js deleted file mode 100644 index 9ec8f63ab2fd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-batch.src.js +++ /dev/null @@ -1 +0,0 @@ -export * from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-default.src.js deleted file mode 100644 index 2c7930d925cb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-default.src.js +++ /dev/null @@ -1 +0,0 @@ -export {default} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-default.src.js deleted file mode 100644 index 5be9a685aabd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-default.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as default} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifier.src.js deleted file mode 100644 index 9fff903bd969..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifiers.src.js deleted file mode 100644 index 4461d79e3bf3..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-named-as-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as default, bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifier.src.js deleted file mode 100644 index 83b7b67c51ce..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifiers.src.js deleted file mode 100644 index 35c2762a2954..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-from-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo, bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-function.src.js deleted file mode 100644 index 768586d72c59..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-function.src.js +++ /dev/null @@ -1 +0,0 @@ -export function foo () {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-default.src.js deleted file mode 100644 index 5d32a24de0a9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-default.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as default}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifier.src.js deleted file mode 100644 index e7820a6f027c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as bar}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifiers.src.js deleted file mode 100644 index ff57927839e8..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-as-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo as default, bar}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-class.src.js deleted file mode 100644 index 3cb35e97ee95..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-class.src.js +++ /dev/null @@ -1,3 +0,0 @@ -export class Test { - -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-empty.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-empty.src.js deleted file mode 100644 index cb0ff5c3b541..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-empty.src.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifier.src.js deleted file mode 100644 index df5f5e609e93..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers-comma.src.js deleted file mode 100644 index 61bc40fd77ea..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo, bar,}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers.src.js deleted file mode 100644 index fdbc94275097..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-named-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo, bar}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-anonymous-function.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-anonymous-function.src.js deleted file mode 100644 index f8af28821237..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-anonymous-function.src.js +++ /dev/null @@ -1 +0,0 @@ -export var foo = function () {}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-number.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-number.src.js deleted file mode 100644 index e2e71aa4fc6d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var-number.src.js +++ /dev/null @@ -1 +0,0 @@ -export var foo = 1; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/export-var.src.js deleted file mode 100644 index 62da3e60183c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/export-var.src.js +++ /dev/null @@ -1 +0,0 @@ -export var bar; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-named-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-named-specifiers.src.js deleted file mode 100644 index e544977b3acf..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-named-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo, {bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js deleted file mode 100644 index 084fa0cdd14a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo, * as bar from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-as.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-as.src.js deleted file mode 100644 index 96c936db1040..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default-as.src.js +++ /dev/null @@ -1 +0,0 @@ -import {default as foo} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-default.src.js deleted file mode 100644 index 8d1420050a85..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-default.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-jquery.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-jquery.src.js deleted file mode 100644 index ea74241b4bab..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-jquery.src.js +++ /dev/null @@ -1 +0,0 @@ -import $ from "jquery" diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-module.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-module.src.js deleted file mode 100644 index c0748305d535..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-module.src.js +++ /dev/null @@ -1 +0,0 @@ -import "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifier.src.js deleted file mode 100644 index 769f3b3d0cb2..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar as baz} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifiers.src.js deleted file mode 100644 index 5198ead3cde7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-as-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar as baz, xyz} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-empty.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-empty.src.js deleted file mode 100644 index 5faab37ebb44..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-empty.src.js +++ /dev/null @@ -1 +0,0 @@ -import {} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifier.src.js deleted file mode 100644 index fc80c74dd71d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers-comma.src.js deleted file mode 100644 index c2e95853d61f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar, baz,} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers.src.js deleted file mode 100644 index 2fb83c2349cc..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-named-specifiers.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar, baz} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-namespace-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-namespace-specifier.src.js deleted file mode 100644 index e55c0775003b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-namespace-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import * as foo from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/import-null-as-nil.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/import-null-as-nil.src.js deleted file mode 100644 index ced8a86bb836..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/import-null-as-nil.src.js +++ /dev/null @@ -1 +0,0 @@ -import { null as nil } from "bar" diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-await.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-await.src.js deleted file mode 100644 index 91cd4f3b2b1f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-await.src.js +++ /dev/null @@ -1 +0,0 @@ -export var await; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-class.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-class.src.js deleted file mode 100644 index a6e68e983892..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-class.src.js +++ /dev/null @@ -1 +0,0 @@ -export default class {} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js deleted file mode 100644 index 3f576881e6c5..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js +++ /dev/null @@ -1 +0,0 @@ -export * diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-token.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-token.src.js deleted file mode 100644 index 32cb28ea92ba..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-batch-token.src.js +++ /dev/null @@ -1 +0,0 @@ -export * + diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-equal.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-equal.src.js deleted file mode 100644 index 0dfb038eb536..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-equal.src.js +++ /dev/null @@ -1 +0,0 @@ -export default = 42 diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-token.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-token.src.js deleted file mode 100644 index a0af03d2e65f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default-token.src.js +++ /dev/null @@ -1 +0,0 @@ -export {default} + diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default.src.js deleted file mode 100644 index 8dfa0a19a948..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-default.src.js +++ /dev/null @@ -1 +0,0 @@ -export default from "foo" diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-default.src.js deleted file mode 100644 index 8f3cde5c9618..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-default.src.js +++ /dev/null @@ -1 +0,0 @@ -export {default} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js deleted file mode 100644 index 40bb7fe8ade6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo,baz,,} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js deleted file mode 100644 index ff3424cc6027..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo,,baz} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js deleted file mode 100644 index 69aac7e8e153..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo, {bar}, foo from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named.src.js deleted file mode 100644 index 5be12dab64a6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-after-named.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar}, foo from "foo" diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js deleted file mode 100644 index ddf557475a4a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js deleted file mode 100644 index 16e3ea289785..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import foo from bar; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default.src.js deleted file mode 100644 index 6399a1a6620d..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-default.src.js +++ /dev/null @@ -1 +0,0 @@ -import default from "foo" diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js deleted file mode 100644 index 338ebc128b7e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -import { foo, bar } diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-module-specifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-module-specifier.src.js deleted file mode 100644 index 15dda167c6bd..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-module-specifier.src.js +++ /dev/null @@ -1 +0,0 @@ -export {foo} from bar diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-named.src.js deleted file mode 100644 index a0557bf0ea54..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-named.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar}, {foo} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js deleted file mode 100644 index 24cede9de625..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js +++ /dev/null @@ -1 +0,0 @@ -import * as foo, {bar} from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js deleted file mode 100644 index 5d7daedfbd96..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js +++ /dev/null @@ -1 +0,0 @@ -import {default as foo} diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js deleted file mode 100644 index fd0b19b89bd5..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -import {foo,baz,,} from 'toast'; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js deleted file mode 100644 index 467552325fd2..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -import {foo,,baz} from 'toast'; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js deleted file mode 100644 index 09d0d344e633..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js +++ /dev/null @@ -1 +0,0 @@ -import {bar}, * as foo from "foo"; diff --git a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js b/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js deleted file mode 100644 index 4382a94adbfb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js +++ /dev/null @@ -1 +0,0 @@ -import * from "foo" diff --git a/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-new-target.src.js b/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-new-target.src.js deleted file mode 100644 index 46b13d0e56be..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-new-target.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = new.target; diff --git a/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-unknown-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-unknown-property.src.js deleted file mode 100644 index dc1b123d55d7..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/newTarget/invalid-unknown-property.src.js +++ /dev/null @@ -1 +0,0 @@ -var f = function() { new.unknown_property; } diff --git a/packages/typescript-estree/tests/fixtures/javascript/newTarget/simple-new-target.src.js b/packages/typescript-estree/tests/fixtures/javascript/newTarget/simple-new-target.src.js deleted file mode 100644 index 44b77c7aacb6..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/newTarget/simple-new-target.src.js +++ /dev/null @@ -1,3 +0,0 @@ -function f() { - var x = new.target; -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js deleted file mode 100644 index 9c3cf5a43a0a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js +++ /dev/null @@ -1,3 +0,0 @@ -var x = { - [5 + 5]: foo -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js deleted file mode 100644 index cbc10a6adc96..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js +++ /dev/null @@ -1 +0,0 @@ -({[x]: 10, y: 20}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js deleted file mode 100644 index 8b7a70fd3a66..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js +++ /dev/null @@ -1 +0,0 @@ -({get [x]() {}, set [x](v) {}}); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js deleted file mode 100644 index d555f8aaa3b9..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js +++ /dev/null @@ -1,3 +0,0 @@ -var x = { - ["hey"]: foo -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js deleted file mode 100644 index 7f41c2c10c4a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js +++ /dev/null @@ -1,3 +0,0 @@ -var x = { - [bar]: foo -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js deleted file mode 100644 index 77380e2ad357..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js +++ /dev/null @@ -1,3 +0,0 @@ -var x = { - [bar] -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js deleted file mode 100644 index 8925311d4766..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js +++ /dev/null @@ -1 +0,0 @@ -({[x]}); diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js deleted file mode 100644 index 14e5e1dcb0b8..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js +++ /dev/null @@ -1 +0,0 @@ -({["x" + "y"]: 10}); diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js deleted file mode 100644 index eafa2481f503..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js +++ /dev/null @@ -1 +0,0 @@ -({[x]: function() {}}); diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js deleted file mode 100644 index 0d7e62648fe2..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -({[x]: 10}); diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js deleted file mode 100644 index 5fc4a41be350..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var proto = {}; - -var x = { - __proto__: proto, - __proto__: proto -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js deleted file mode 100644 index 8761b73461ca..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var proto = {}; - -var x = { - "__proto__": proto, - "__proto__": proto -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js deleted file mode 100644 index 3942db82641a..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var x = { - y: 'first', - y: 'second' -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js deleted file mode 100644 index 0f2b2710246e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var x = { - "y": "first", - "y": "second" -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js deleted file mode 100644 index 6fd56ea339eb..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js +++ /dev/null @@ -1,3 +0,0 @@ -x = { - method() 42 -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js deleted file mode 100644 index 5c09849b2e79..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js +++ /dev/null @@ -1,5 +0,0 @@ -var x = { - foo() { - return bar; - } -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js deleted file mode 100644 index b7f03cdef933..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js +++ /dev/null @@ -1,4 +0,0 @@ -x = { - get() { - } -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js deleted file mode 100644 index 33ce0e95c298..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js +++ /dev/null @@ -1,4 +0,0 @@ -x = { - set() { - } -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js deleted file mode 100644 index db824acd2671..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js +++ /dev/null @@ -1,5 +0,0 @@ -x = { - method(test) { - - } -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js deleted file mode 100644 index 345b88844421..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js +++ /dev/null @@ -1,4 +0,0 @@ -x = { - "method"() { - } -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js deleted file mode 100644 index 0a69310519e1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js +++ /dev/null @@ -1,4 +0,0 @@ -x = { - method() { - } -};; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js deleted file mode 100644 index 0c168a31648e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js +++ /dev/null @@ -1,5 +0,0 @@ -var x = { - "foo"() { - return bar; - } -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js b/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js deleted file mode 100644 index 1b881004b3c1..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js +++ /dev/null @@ -1,9 +0,0 @@ -var foo, - get, - set; - -var x = { - foo, - get, - set -}; diff --git a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/invalid.src.js b/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/invalid.src.js deleted file mode 100644 index d0074ff52156..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/invalid.src.js +++ /dev/null @@ -1 +0,0 @@ -0o12z; diff --git a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/lowercase.src.js b/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/lowercase.src.js deleted file mode 100644 index 7655a4ee496e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/lowercase.src.js +++ /dev/null @@ -1 +0,0 @@ -0o717; diff --git a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/strict-uppercase.src.js b/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/strict-uppercase.src.js deleted file mode 100644 index 5bf66b1e2072..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/strict-uppercase.src.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -0O717; diff --git a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/uppercase.src.js b/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/uppercase.src.js deleted file mode 100644 index a5af9801c940..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/octalLiterals/uppercase.src.js +++ /dev/null @@ -1 +0,0 @@ -0O717; diff --git a/packages/typescript-estree/tests/fixtures/javascript/regex/regexp-simple.src.js b/packages/typescript-estree/tests/fixtures/javascript/regex/regexp-simple.src.js deleted file mode 100644 index 68f882c4ed36..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/regex/regexp-simple.src.js +++ /dev/null @@ -1 +0,0 @@ -var foo = /foo./; diff --git a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js b/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js deleted file mode 100644 index 97c9442e5a4e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = /[\u{0000000000000061}-\u{7A}]/u; diff --git a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js b/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js deleted file mode 100644 index 07db7a79d553..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = /\u{110000}/u; diff --git a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-simple.src.js b/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-simple.src.js deleted file mode 100644 index c31d75552b1e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/regexUFlag/regex-u-simple.src.js +++ /dev/null @@ -1 +0,0 @@ -var foo = /foo/u; diff --git a/packages/typescript-estree/tests/fixtures/javascript/regexYFlag/regexp-y-simple.src.js b/packages/typescript-estree/tests/fixtures/javascript/regexYFlag/regexp-y-simple.src.js deleted file mode 100644 index ab3585070d91..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/regexYFlag/regexp-y-simple.src.js +++ /dev/null @@ -1 +0,0 @@ -var foo = /foo/y; diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/basic-rest.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/basic-rest.src.js deleted file mode 100644 index c7d2b9477c55..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/basic-rest.src.js +++ /dev/null @@ -1 +0,0 @@ -function f(a, ...b) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/class-constructor.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/class-constructor.src.js deleted file mode 100644 index 03407bf25900..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/class-constructor.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - constructor(...foo) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/class-method.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/class-method.src.js deleted file mode 100644 index 48319379e161..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/class-method.src.js +++ /dev/null @@ -1,4 +0,0 @@ -class A { - foo(...bar) { - } -} diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/error-no-default.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/error-no-default.src.js deleted file mode 100644 index 6de42c245a52..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/error-no-default.src.js +++ /dev/null @@ -1 +0,0 @@ -function f(a, ...b = 0); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/error-not-last.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/error-not-last.src.js deleted file mode 100644 index 309cc7573260..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/error-not-last.src.js +++ /dev/null @@ -1 +0,0 @@ -function f(a, ...b, c); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression-multi.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression-multi.src.js deleted file mode 100644 index 68f41d812e6c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression-multi.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = function(a, ...b) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression.src.js deleted file mode 100644 index a7984c62a640..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/func-expression.src.js +++ /dev/null @@ -1 +0,0 @@ -var x = function (...a) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/invalid-rest-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/invalid-rest-param.src.js deleted file mode 100644 index 49f73ed38546..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/invalid-rest-param.src.js +++ /dev/null @@ -1 +0,0 @@ -function x(...{ a }){}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/restParams/single-rest.src.js b/packages/typescript-estree/tests/fixtures/javascript/restParams/single-rest.src.js deleted file mode 100644 index 9c90dd499935..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/restParams/single-rest.src.js +++ /dev/null @@ -1 +0,0 @@ -function f(...b) {}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-if.src.js b/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-if.src.js deleted file mode 100644 index 360727b872ef..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-if.src.js +++ /dev/null @@ -1 +0,0 @@ -if (b,...a, ); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-sequence.src.js b/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-sequence.src.js deleted file mode 100644 index 98458f83d68c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/spread/error-invalid-sequence.src.js +++ /dev/null @@ -1 +0,0 @@ -(b, ...a); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/multi-function-call.src.js b/packages/typescript-estree/tests/fixtures/javascript/spread/multi-function-call.src.js deleted file mode 100644 index 49237c1f1480..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/spread/multi-function-call.src.js +++ /dev/null @@ -1 +0,0 @@ -foo(a, ...b); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/not-final-param.src.js b/packages/typescript-estree/tests/fixtures/javascript/spread/not-final-param.src.js deleted file mode 100644 index 7510298b7ca0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/spread/not-final-param.src.js +++ /dev/null @@ -1 +0,0 @@ -func(...a, b); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/spread/simple-function-call.src.js b/packages/typescript-estree/tests/fixtures/javascript/spread/simple-function-call.src.js deleted file mode 100644 index 1cc736a0c23c..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/spread/simple-function-call.src.js +++ /dev/null @@ -1 +0,0 @@ -foo(...a); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/deeply-nested.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/deeply-nested.src.js deleted file mode 100644 index 4dc0eeb08a34..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/deeply-nested.src.js +++ /dev/null @@ -1 +0,0 @@ -raw`hello ${`nested ${`deeply` + {}} blah`}`; diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/error-octal-literal.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/error-octal-literal.src.js deleted file mode 100644 index 31c66a405763..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/error-octal-literal.src.js +++ /dev/null @@ -1 +0,0 @@ -`\07`; diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/escape-characters.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/escape-characters.src.js deleted file mode 100644 index 4163a542c54e..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/escape-characters.src.js +++ /dev/null @@ -1 +0,0 @@ -var ts = `\\n\\r\\b\\v\\t\\f\\\n\\\r\n`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/expressions.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/expressions.src.js deleted file mode 100644 index bbe595e9ecfe..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/expressions.src.js +++ /dev/null @@ -1,4 +0,0 @@ -var a = 5; -var b = 'Fred'; - -`Hello ${b}. a + 5 = ${a + 5}`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/multi-line-template-string.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/multi-line-template-string.src.js deleted file mode 100644 index 4d4d65d91ce5..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/multi-line-template-string.src.js +++ /dev/null @@ -1,6 +0,0 @@ -`The last man on Earth - sat alone in a room. - There was - a knock - on the - door...`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/simple-template-string.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/simple-template-string.src.js deleted file mode 100644 index 1e6428494f65..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/simple-template-string.src.js +++ /dev/null @@ -1 +0,0 @@ -`42`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/single-dollar-sign.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/single-dollar-sign.src.js deleted file mode 100644 index 6788caf51477..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/single-dollar-sign.src.js +++ /dev/null @@ -1 +0,0 @@ -var ts = `$`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js deleted file mode 100644 index 02458f045eb3..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js +++ /dev/null @@ -1 +0,0 @@ -foo`foo`; diff --git a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-template-string.src.js b/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-template-string.src.js deleted file mode 100644 index 61a0bdac2e5f..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/templateStrings/tagged-template-string.src.js +++ /dev/null @@ -1,4 +0,0 @@ -function tag() { - console.log(arguments); -} -tag`a is ${a} while b is ${b}.`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js b/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js deleted file mode 100644 index 9edb72773067..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js +++ /dev/null @@ -1 +0,0 @@ -"\u{714E}\u{8336}"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js b/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js deleted file mode 100644 index ac32b40609c0..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js +++ /dev/null @@ -1 +0,0 @@ -"\u{20BB7}\u{10FFFF}\u{1}"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js b/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js deleted file mode 100644 index 5d58cb32306b..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js +++ /dev/null @@ -1 +0,0 @@ -"\u{}"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js b/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js deleted file mode 100644 index 30b7cd791f31..000000000000 --- a/packages/typescript-estree/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js +++ /dev/null @@ -1 +0,0 @@ -"\u{FFFFFF}"; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js deleted file mode 100644 index b1b254055e2e..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/test-content.src.js b/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/test-content.src.js deleted file mode 100644 index ffaed57254f4..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx-useJSXTextNode/test-content.src.js +++ /dev/null @@ -1 +0,0 @@ -
@test content
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/attributes.src.js b/packages/typescript-estree/tests/fixtures/jsx/attributes.src.js deleted file mode 100644 index 5de9359ff361..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/attributes.src.js +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/element-keyword-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/element-keyword-name.src.js deleted file mode 100644 index 55faaf141dc2..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/element-keyword-name.src.js +++ /dev/null @@ -1,5 +0,0 @@ -
- - - - diff --git a/packages/typescript-estree/tests/fixtures/jsx/embedded-comment.src.js b/packages/typescript-estree/tests/fixtures/jsx/embedded-comment.src.js deleted file mode 100644 index 9ccfd89113d4..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/embedded-comment.src.js +++ /dev/null @@ -1 +0,0 @@ -{/* this is a comment */}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/embedded-conditional.src.js b/packages/typescript-estree/tests/fixtures/jsx/embedded-conditional.src.js deleted file mode 100644 index 44134ac352b9..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/embedded-conditional.src.js +++ /dev/null @@ -1 +0,0 @@ - : } />; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/embedded-invalid-js-identifier.src.js b/packages/typescript-estree/tests/fixtures/jsx/embedded-invalid-js-identifier.src.js deleted file mode 100644 index 5138ffb14237..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/embedded-invalid-js-identifier.src.js +++ /dev/null @@ -1 +0,0 @@ -

7x invalid-js-identifier
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/embedded-tags.src.js b/packages/typescript-estree/tests/fixtures/jsx/embedded-tags.src.js deleted file mode 100644 index 48260fa6544a..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/embedded-tags.src.js +++ /dev/null @@ -1 +0,0 @@ - right=monkeys /> gorillas />; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/empty-placeholder.src.js b/packages/typescript-estree/tests/fixtures/jsx/empty-placeholder.src.js deleted file mode 100644 index 7e7ae12a57fa..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/empty-placeholder.src.js +++ /dev/null @@ -1 +0,0 @@ -
{}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/escape-patterns.src.js b/packages/typescript-estree/tests/fixtures/jsx/escape-patterns.src.js deleted file mode 100644 index b218700ab0f5..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/escape-patterns.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute-missing-equals.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute-missing-equals.src.js deleted file mode 100644 index c4bdb625c16c..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute-missing-equals.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute.src.js deleted file mode 100644 index a3d16ade8f01..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-attribute.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-broken-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-broken-tag.src.js deleted file mode 100644 index 20899cb988ae..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-broken-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-leading-dot-tag-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-leading-dot-tag-name.src.js deleted file mode 100644 index 297c850a4931..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-leading-dot-tag-name.src.js +++ /dev/null @@ -1 +0,0 @@ -<.a>; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js deleted file mode 100644 index e2b8b4aabcc6..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -
stuff
; diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tag.src.js deleted file mode 100644 index 70b531344460..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tags.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tags.src.js deleted file mode 100644 index cdb02a657ee0..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-closing-tags.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js deleted file mode 100644 index aed52724e824..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-dot-tag-name.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-namespace-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-namespace-tag.src.js deleted file mode 100644 index bbda65c72d7c..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-mismatched-namespace-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js deleted file mode 100644 index b6d9a638840e..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag.src.js deleted file mode 100644 index 7c7493261deb..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-closing-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-name.src.js deleted file mode 100644 index 203ca0836b8f..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-name.src.js +++ /dev/null @@ -1 +0,0 @@ -<:a />; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-value.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-value.src.js deleted file mode 100644 index 52bc77e33ac1..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-namespace-value.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-spread-operator.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-spread-operator.src.js deleted file mode 100644 index 2d96e2fa71cb..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-missing-spread-operator.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-name-with-docts.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-name-with-docts.src.js deleted file mode 100644 index 4c9e774a3c74..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-name-with-docts.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-value-with-dots.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-value-with-dots.src.js deleted file mode 100644 index f3a9fdc0e4f8..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-namespace-value-with-dots.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent-with-comment.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent-with-comment.src.js deleted file mode 100644 index 0c8bde149a88..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent-with-comment.src.js +++ /dev/null @@ -1 +0,0 @@ -var x =
one
/* intervening comment */
two
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent.src.js deleted file mode 100644 index 7f8c0f612b39..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-common-parent.src.js +++ /dev/null @@ -1 +0,0 @@ -var x =
one
two
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-tag-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-no-tag-name.src.js deleted file mode 100644 index a365ca6f5564..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-no-tag-name.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js deleted file mode 100644 index cff69dd9a082..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-placeholder-in-closing-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -
stuff
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-trailing-dot-tag-name.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-trailing-dot-tag-name.src.js deleted file mode 100644 index 40585f15c755..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-trailing-dot-tag-name.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/invalid-unexpected-comma.src.js b/packages/typescript-estree/tests/fixtures/jsx/invalid-unexpected-comma.src.js deleted file mode 100644 index afdfc83b1575..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/invalid-unexpected-comma.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/japanese-characters.src.js b/packages/typescript-estree/tests/fixtures/jsx/japanese-characters.src.js deleted file mode 100644 index 750d3539568e..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/japanese-characters.src.js +++ /dev/null @@ -1 +0,0 @@ -<日本語>; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/less-than-operator.src.js b/packages/typescript-estree/tests/fixtures/jsx/less-than-operator.src.js deleted file mode 100644 index d2b623552527..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/less-than-operator.src.js +++ /dev/null @@ -1 +0,0 @@ -(
) < x; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/member-expression-this.src.js b/packages/typescript-estree/tests/fixtures/jsx/member-expression-this.src.js deleted file mode 100644 index a9ab134d4b48..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/member-expression-this.src.js +++ /dev/null @@ -1,2 +0,0 @@ -; -; diff --git a/packages/typescript-estree/tests/fixtures/jsx/member-expression.src.js b/packages/typescript-estree/tests/fixtures/jsx/member-expression.src.js deleted file mode 100644 index a5cd092d6ed2..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/member-expression.src.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/typescript-estree/tests/fixtures/jsx/multiple-blank-spaces.src.js b/packages/typescript-estree/tests/fixtures/jsx/multiple-blank-spaces.src.js deleted file mode 100644 index 8283d5e183d2..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/multiple-blank-spaces.src.js +++ /dev/null @@ -1 +0,0 @@ - ; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js b/packages/typescript-estree/tests/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js deleted file mode 100644 index 6cd67fa28f0f..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/namespaced-attribute-and-value-inserted.src.js +++ /dev/null @@ -1 +0,0 @@ - {value} ; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/namespaced-name-and-attribute.src.js b/packages/typescript-estree/tests/fixtures/jsx/namespaced-name-and-attribute.src.js deleted file mode 100644 index eb59e59d6b6b..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/namespaced-name-and-attribute.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/newslines-and-entities.src.js b/packages/typescript-estree/tests/fixtures/jsx/newslines-and-entities.src.js deleted file mode 100644 index adcbb4c63a2c..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/newslines-and-entities.src.js +++ /dev/null @@ -1 +0,0 @@ -\nbar\nbaz\r\n; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-inside-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-inside-tag.src.js deleted file mode 100644 index b1b254055e2e..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-inside-tag.src.js +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-with-newline.src.js b/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-with-newline.src.js deleted file mode 100644 index 11d5cedfff0b..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag-with-newline.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag.src.js b/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag.src.js deleted file mode 100644 index 461e8955c72a..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/self-closing-tag.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/spread-child.src.js b/packages/typescript-estree/tests/fixtures/jsx/spread-child.src.js deleted file mode 100644 index 48ce23c9bd02..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/spread-child.src.js +++ /dev/null @@ -1 +0,0 @@ -
{...[0]}
diff --git a/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js b/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js deleted file mode 100644 index ee11c44f484f..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attributes.src.js b/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attributes.src.js deleted file mode 100644 index 99d6539aae2e..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/spread-operator-attributes.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-dots.src.js b/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-dots.src.js deleted file mode 100644 index 6d5813d15dfa..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-dots.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-multi-dots.src.js b/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-multi-dots.src.js deleted file mode 100644 index 78a3d60d40d7..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/tag-names-with-multi-dots.src.js +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/test-content.src.js b/packages/typescript-estree/tests/fixtures/jsx/test-content.src.js deleted file mode 100644 index ffaed57254f4..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/test-content.src.js +++ /dev/null @@ -1 +0,0 @@ -
@test content
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/trailing-spread-operator-attribute.src.js b/packages/typescript-estree/tests/fixtures/jsx/trailing-spread-operator-attribute.src.js deleted file mode 100644 index ee9ab396dbff..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/trailing-spread-operator-attribute.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/jsx/unknown-escape-pattern.src.js b/packages/typescript-estree/tests/fixtures/jsx/unknown-escape-pattern.src.js deleted file mode 100644 index d300d95f45ca..000000000000 --- a/packages/typescript-estree/tests/fixtures/jsx/unknown-escape-pattern.src.js +++ /dev/null @@ -1 +0,0 @@ -
; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/tsx/generic-jsx-element.src.tsx b/packages/typescript-estree/tests/fixtures/tsx/generic-jsx-element.src.tsx deleted file mode 100644 index 7a620161439c..000000000000 --- a/packages/typescript-estree/tests/fixtures/tsx/generic-jsx-element.src.tsx +++ /dev/null @@ -1 +0,0 @@ - data={12} /> diff --git a/packages/typescript-estree/tests/fixtures/tsx/react-typed-props.src.tsx b/packages/typescript-estree/tests/fixtures/tsx/react-typed-props.src.tsx deleted file mode 100644 index ebeccee4f4f1..000000000000 --- a/packages/typescript-estree/tests/fixtures/tsx/react-typed-props.src.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import * as React from 'react' -type Props = { - title: string -} - -export default function App(props: Props) { - return ( -

- {props.title} -

- ) -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts b/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts deleted file mode 100644 index 56d367c193d4..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts +++ /dev/null @@ -1 +0,0 @@ -function f< T >() {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameters.src.ts b/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameters.src.ts deleted file mode 100644 index 526137f30906..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/babylon-convergence/type-parameters.src.ts +++ /dev/null @@ -1 +0,0 @@ -function f() {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts deleted file mode 100644 index 66b70824ae24..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export abstract class AbstractSocket { - abstract constructor(); -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts deleted file mode 100644 index 537036b92f84..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export abstract class AbstractSocket { - abstract createSocket(): Promise; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts deleted file mode 100644 index 42128953cb7d..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -abstract class Foo { - abstract bar; - abstract baz = 3; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts deleted file mode 100644 index 8c28567ce8e7..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -abstract class Foo { - public abstract readonly foo = 'string'; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts deleted file mode 100644 index f39ba3fc0b8c..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-class-with-optional-method.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export abstract class AbstractSocket { - createSocket?(): Promise; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-interface.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-interface.src.ts deleted file mode 100644 index 8fafeca6066c..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/abstract-interface.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -export abstract interface I { -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts deleted file mode 100644 index a50543105d12..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -(b: X): X => { - return b; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-expression.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-expression.src.ts deleted file mode 100644 index 7849af4e1bca..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-expression.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -(async function test() { -})(); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-with-var-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-with-var-declaration.src.ts deleted file mode 100644 index e691825b8056..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/async-function-with-var-declaration.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -async function test() { - var foo = 'foo'; - let bar = 'bar'; - const fooBar = 'fooBar'; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts deleted file mode 100644 index 14b2f8e38750..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts +++ /dev/null @@ -1,10 +0,0 @@ -class Foo { - private bar : string; - public static baz : number; - public getBar () { - return this.bar; - } - protected setBar (bar : string) { - this.bar = bar; - } -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-definite-assignment.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-definite-assignment.src.ts deleted file mode 100644 index b1882b9f280d..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-definite-assignment.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class X { - a!: string; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts deleted file mode 100644 index f1befb271eef..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-export-parameter-properties.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - constructor(export a: string) { - - } -} - diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-and-implements.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-and-implements.src.ts deleted file mode 100644 index fe7ea2560e59..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-and-implements.src.ts +++ /dev/null @@ -1 +0,0 @@ -class ClassWithParentAndInterface extends MyOtherClass implements MyInterface {} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts deleted file mode 100644 index a37bc0a5d9b8..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo
extends Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic.src.ts deleted file mode 100644 index 0c32155ff2f6..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-extends-generic.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo extends Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method-default.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method-default.src.ts deleted file mode 100644 index 957a382b419a..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method-default.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - getBar() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method.src.ts deleted file mode 100644 index abef5e5909c6..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-generic-method.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - getBar() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-and-extends.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-and-extends.src.ts deleted file mode 100644 index fe44fc7ba1b2..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-and-extends.src.ts +++ /dev/null @@ -1 +0,0 @@ -class ClassWithParentAndInterface implements MyInterface extends MyOtherClass {} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts deleted file mode 100644 index 0a02bc2081f4..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo implements Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic.src.ts deleted file mode 100644 index b18efb98d086..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements-generic.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo implements Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements.src.ts deleted file mode 100644 index 321a2ea746ae..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-implements.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo implements Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-mixin.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-mixin.src.ts deleted file mode 100644 index 975b36a3e7d1..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-mixin.src.ts +++ /dev/null @@ -1,9 +0,0 @@ -function M>(Base: T) { - return class extends Base { } -} - -class X extends M(C) implements I { } - -class C { } -interface I { } -type Constructor = new (...args: any[]) => T; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-computed-property.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-computed-property.src.ts deleted file mode 100644 index 5dd15f31b2a1..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-computed-property.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class X { - private ['foo']? = undefined; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-methods.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-methods.src.ts deleted file mode 100644 index 2fe152d3d419..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-methods.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class Foo { - foo?(); - bar?(): string; - private baz?(): string; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-properties.src.ts deleted file mode 100644 index 536aab8062dc..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-properties.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class Foo { - foo?; - bar? : string; - private baz? : string; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts deleted file mode 100644 index 126d595430f0..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-optional-property-undefined.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class X { - private foo? = undefined; -} - diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts deleted file mode 100644 index f806c1ee9f8a..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-private-parameter-properties.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - constructor(private firstName: string, - private readonly lastName: string, - private age: number = 30, - private readonly student: boolean = false) {} -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts deleted file mode 100644 index 1abd3446ff0d..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - constructor(protected firstName: string, - protected readonly lastName: string, - protected age: number = 30, - protected readonly student: boolean = false) {} -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts deleted file mode 100644 index cf2ee5a5062e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-public-parameter-properties.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - constructor(public firstName: string, - public readonly lastName: string, - public age: number = 30, - public readonly student: boolean = false) {} -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts deleted file mode 100644 index 2525c6720f21..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class Foo { - constructor(readonly firstName: string, - readonly lastName: string = 'Smith') {} -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-property.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-property.src.ts deleted file mode 100644 index feb96572fa88..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-readonly-property.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - public readonly foo = 'string'; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts deleted file mode 100644 index b11377560f8c..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-static-parameter-properties.src.ts +++ /dev/null @@ -1,7 +0,0 @@ -class Foo { - constructor(static a: string) { - - } -} - - diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-default.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-default.src.ts deleted file mode 100644 index b416539347d4..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-default.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts deleted file mode 100644 index f68d76c805e6..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts +++ /dev/null @@ -1 +0,0 @@ -class A<__P> {} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter.src.ts deleted file mode 100644 index 4c6ce17948cb..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/class-with-type-parameter.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/const-enum.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/const-enum.src.ts deleted file mode 100644 index 40f9491211d2..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/const-enum.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -const enum Foo { - foo = 1, - bar -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/declare-class-with-optional-method.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/declare-class-with-optional-method.src.ts deleted file mode 100644 index ecb4a4e11487..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/declare-class-with-optional-method.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare class Foo { - bar?(): any; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/declare-function.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/declare-function.src.ts deleted file mode 100644 index 4f4d10709f56..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/declare-function.src.ts +++ /dev/null @@ -1 +0,0 @@ -declare function foo(bar: string): string; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment.src.ts deleted file mode 100644 index d29509f70afd..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/destructuring-assignment.src.ts +++ /dev/null @@ -1 +0,0 @@ -({ foo = [] } = bar); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-assignment.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-assignment.src.ts deleted file mode 100644 index 36a5d0e319d8..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-assignment.src.ts +++ /dev/null @@ -1 +0,0 @@ -export = foo; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-generic.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-generic.src.ts deleted file mode 100644 index 8b0d9acbf807..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-generic.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default class { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts deleted file mode 100644 index 7eb59ca4e0c7..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default class { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-generic.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-generic.src.ts deleted file mode 100644 index ad37e87c5551..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-generic.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Foo { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts deleted file mode 100644 index 9abd7bb1623e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Foo { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-enum.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-enum.src.ts deleted file mode 100644 index b651108672c9..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-named-enum.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum Foo { - foo = 1, - bar -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-alias-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-alias-declaration.src.ts deleted file mode 100644 index d166857d8a5e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-alias-declaration.src.ts +++ /dev/null @@ -1 +0,0 @@ -export type TestAlias = string | number; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-class-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-class-declaration.src.ts deleted file mode 100644 index a7999bbcaa15..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-class-declaration.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type TestClassProps = { - count: number -}; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-function-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-function-declaration.src.ts deleted file mode 100644 index 1948b43ead29..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/export-type-function-declaration.src.ts +++ /dev/null @@ -1 +0,0 @@ -export type TestCallback = (a: number) => void; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-await.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-await.src.ts deleted file mode 100644 index e867dc45d20a..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-await.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -async function hope(future) { - await future; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts deleted file mode 100644 index 49837b4a1505..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function foo({bar, baz}: {bar?: string, baz?}) { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts deleted file mode 100644 index bd3604de9f7f..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function foo({bar, baz}: {bar: string, baz}) { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts deleted file mode 100644 index 1b328010c98b..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts +++ /dev/null @@ -1 +0,0 @@ -function compare() {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts deleted file mode 100644 index f3c4d2eaa906..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function a(b: X): X { - return b; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters.src.ts deleted file mode 100644 index cd0bdc5cc45b..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-type-parameters.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function a(b: X): X { - return b; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types-assignation.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types-assignation.src.ts deleted file mode 100644 index b6d3f08924a0..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types-assignation.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function message(name:string, age:number = 100, ...args:Array):string { - return name; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types.src.ts deleted file mode 100644 index 57eb3a476d15..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/function-with-types.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -function message(name:string):string { - return name; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts deleted file mode 100644 index 2c8acc12d369..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts +++ /dev/null @@ -1 +0,0 @@ -type X = A>; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/import-type.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/import-type.src.ts deleted file mode 100644 index 00e3ba6afc1e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/import-type.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -type A = typeof import('A'); -type B = import("B").X; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends-multiple.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends-multiple.src.ts deleted file mode 100644 index e3b646613572..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends-multiple.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo extends Bar,Baz { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends.src.ts deleted file mode 100644 index 1cc0e41709ea..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-extends.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo extends Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-type-parameters.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-type-parameters.src.ts deleted file mode 100644 index d2c9ee32ff79..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-type-parameters.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-all-property-types.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-all-property-types.src.ts deleted file mode 100644 index 90f0c80ebc41..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-all-property-types.src.ts +++ /dev/null @@ -1,15 +0,0 @@ -interface Foo { - baa: number; - bar?: number; - [bax]: string; - [baz]?: string; - [eee: number]: string; - [fff?: number]: string; - doo(): void; - doo?(a, b, c): void; - [loo]?(a, b, c): void; - boo(a, b, c): void; - new (a, b?): string; - new (a, b?): string; -} - diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts deleted file mode 100644 index 4d52aa4cc16c..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Test { - new (public x, private y); -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts deleted file mode 100644 index 5387a76cc744..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo extends Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-generic.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-generic.src.ts deleted file mode 100644 index ec88864d2f07..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-generic.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -interface Test { -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-jsdoc.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-jsdoc.src.ts deleted file mode 100644 index 698a393860f3..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-jsdoc.src.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface Test { - /** - * Comment Line 1 - * @baz bar - */ - foo(bar); -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-optional-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-optional-properties.src.ts deleted file mode 100644 index 448d419a81cd..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-with-optional-properties.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -interface test { - foo?; - bar?: string; - baz?(foo, bar?: string, baz?); -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-without-type-annotation.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/interface-without-type-annotation.src.ts deleted file mode 100644 index 31f184e8e67a..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/interface-without-type-annotation.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface test { - foo; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/keyof-operator.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/keyof-operator.src.ts deleted file mode 100644 index d4cf1df7a5f0..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/keyof-operator.src.ts +++ /dev/null @@ -1 +0,0 @@ -type x = keyof foo; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/nested-type-arguments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/nested-type-arguments.src.ts deleted file mode 100644 index 1e9f54230af3..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/nested-type-arguments.src.ts +++ /dev/null @@ -1 +0,0 @@ -var nestedArray: Array>> \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/never-type-param.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/never-type-param.src.ts deleted file mode 100644 index bff38e99ba01..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/never-type-param.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -const x: X; -Observable.empty(); diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/non-null-assertion-operator.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/non-null-assertion-operator.src.ts deleted file mode 100644 index 18e73855fd2e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/non-null-assertion-operator.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -function processEntity(e?: Entity) { - validateEntity(e); - let s = e!.name; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts deleted file mode 100644 index 7d6b5821f389..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -let x: null; -let y: undefined; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/object-with-escaped-properties.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/object-with-escaped-properties.src.ts deleted file mode 100644 index 430a8bad251d..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/object-with-escaped-properties.src.ts +++ /dev/null @@ -1,7 +0,0 @@ -({ '__': null }); - -({ '__'() {} }); - -({ ['__']: null }); - -class X { '__' = null } diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/symbol-type-param.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/symbol-type-param.src.ts deleted file mode 100644 index b5b19ced740e..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/symbol-type-param.src.ts +++ /dev/null @@ -1 +0,0 @@ -function test(abc: Map) {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts deleted file mode 100644 index 0c5e89163a40..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts +++ /dev/null @@ -1 +0,0 @@ -type Result = Success | Failure \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration.src.ts deleted file mode 100644 index c2067d850774..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-declaration.src.ts +++ /dev/null @@ -1 +0,0 @@ -type Result = Success | Failure \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts deleted file mode 100644 index 5c542c940ace..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/type-alias-object-without-annotation.src.ts +++ /dev/null @@ -1 +0,0 @@ -type foo = {bar: string, baz}; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-parameters-comments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/type-parameters-comments.src.ts deleted file mode 100644 index b79b05bda402..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/type-parameters-comments.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -foo< /* comment 1 */ A /* comment 2 */ >(); -function bar< /* aaa */ A /* bbb */ >() { } -function baz< /* aaa */ A /* bbb */ = Foo >() { } diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/type-reference-comments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/type-reference-comments.src.ts deleted file mode 100644 index 3ca1f8dbb282..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/type-reference-comments.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class AudioBufferList { - mBuffers: interop.Reference; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-this.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/typed-this.src.ts deleted file mode 100644 index 398775778522..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/typed-this.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface UIElement { - addClickListener(onclick: (this: void, e: Event) => void): void; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/unique-symbol.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/unique-symbol.src.ts deleted file mode 100644 index 6d1be9873bdb..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/unique-symbol.src.ts +++ /dev/null @@ -1 +0,0 @@ -type A = unique symbol; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-definite-assignment.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-definite-assignment.src.ts deleted file mode 100644 index 60906317fcad..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-definite-assignment.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -const x!: string; -var y!: number; -let z!: object; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-dotted-type.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-dotted-type.src.ts deleted file mode 100644 index ff0a1885271c..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-dotted-type.src.ts +++ /dev/null @@ -1 +0,0 @@ -var foo: A.B.C; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-type.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-type.src.ts deleted file mode 100644 index 547ca4bd9180..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/var-with-type.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -var name:string = "Nicholas"; -var foo: string = "Bar"; diff --git a/packages/typescript-estree/tests/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts b/packages/typescript-estree/tests/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts deleted file mode 100644 index 03b1ebddffb6..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts +++ /dev/null @@ -1 +0,0 @@ -let x : string; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts deleted file mode 100644 index 24f2b53691d1..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class Point { - @configurable(false) - get x() { return this._x; } -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts deleted file mode 100644 index f48e71052ebe..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class Other { - @foo({ baz: true }) - static get bar() { return this._bar; } -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts deleted file mode 100644 index 4cea72889f61..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class P { - @hidden - get z() { return this._z; } -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts deleted file mode 100644 index f9b2964c0f70..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class User { - @adminonly - static set y(a) { - this._y = a; - } -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts deleted file mode 100644 index 873263376e30..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -@Component({ - selector: 'foo', -}) -class FooComponent {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts deleted file mode 100644 index a72a8ff5dcb1..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/class-decorators/class-decorator.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -@sealed -class Qux {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts deleted file mode 100644 index 12898791abbd..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class B { - @onlyRead(false) - instanceMethod() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts deleted file mode 100644 index 735541ffeb71..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class C { - @Foo(false) - static staticMethod() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts deleted file mode 100644 index a0e5e11a6190..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class A { - @onlyRead - instanceMethod() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts deleted file mode 100644 index 59fc47fe0825..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts +++ /dev/null @@ -1,4 +0,0 @@ -class D { - @Foo - static staticMethod() {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts deleted file mode 100644 index 066334bf8743..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class Service { - constructor(@Inject(APP_CONFIG) config: AppConfig) { - this.title = config.title; - } -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts deleted file mode 100644 index 9b8c50c51fe5..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - bar(@special(true) baz: number) {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts deleted file mode 100644 index 26013fa26279..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class StaticFoo { - static bar(@special(true) baz: number) {} -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts deleted file mode 100644 index fa5f4902a309..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class Greeter { - greet(@required name: string) { - return "Hello " + name + "!"; - } -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts deleted file mode 100644 index ad512a2c2640..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class StaticGreeter { - static greet(@required name: string) { - return "Hello " + name + "!"; - } -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts deleted file mode 100644 index 4e618d12dc37..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class SomeComponent { - @Input() data; - @Output() - click = new EventEmitter(); -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts deleted file mode 100644 index c49b797bf305..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts +++ /dev/null @@ -1,6 +0,0 @@ -class A { - @configurable(true) static prop1; - - @configurable(false) - static prop2; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts deleted file mode 100644 index 8b13a2f4c09b..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class B { - @foo x; - @bar - y; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts b/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts deleted file mode 100644 index df529500e508..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts +++ /dev/null @@ -1,5 +0,0 @@ -class C { - @baz static a; - @qux - static b; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts deleted file mode 100644 index 0d08522dbc07..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo extends implements Bar { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends.src.ts deleted file mode 100644 index 47a27e783f28..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-empty-extends.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo extends { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts deleted file mode 100644 index 42b4c0565f4b..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo extends Bar implements { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts deleted file mode 100644 index c5d3bb05ffc8..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts +++ /dev/null @@ -1 +0,0 @@ -@dec enum E {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts deleted file mode 100644 index adb33f8e53bd..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -@deco() -interface M {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts deleted file mode 100644 index d0a415f25ae5..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/empty-type-arguments.src.ts +++ /dev/null @@ -1 +0,0 @@ -const foo: Foo<> \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts deleted file mode 100644 index a568bf4fcc43..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/enum-with-keywords.src.ts +++ /dev/null @@ -1 +0,0 @@ -export private public protected static readonly abstract async enum X {} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts b/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts deleted file mode 100644 index dae1275e6b11..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/errorRecovery/interface-empty-extends.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo extends { - -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/expressions/call-expression-type-arguments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/expressions/call-expression-type-arguments.src.ts deleted file mode 100644 index 2421c8b7a8c2..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/expressions/call-expression-type-arguments.src.ts +++ /dev/null @@ -1,2 +0,0 @@ -foo(); -foo(); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/expressions/new-expression-type-arguments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/expressions/new-expression-type-arguments.src.ts deleted file mode 100644 index 7e38b6d3d662..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/expressions/new-expression-type-arguments.src.ts +++ /dev/null @@ -1 +0,0 @@ -const a = new A(); \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts b/packages/typescript-estree/tests/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts deleted file mode 100644 index aff1105de138..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts +++ /dev/null @@ -1 +0,0 @@ -foo`baz`; \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts b/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts deleted file mode 100644 index 9b551c215336..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "i-use-things" { - import fs from 'fs'; -} diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts b/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts deleted file mode 100644 index 403557868e70..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare namespace d3 { - export function select(selector: string): Selection; -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts b/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts deleted file mode 100644 index ae4410a51bd3..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts +++ /dev/null @@ -1,7 +0,0 @@ -module "foo" { - export default class C { - method(): C {}; - } - export default function bar() {} -} - diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts b/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts deleted file mode 100644 index 3b55650bc894..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts +++ /dev/null @@ -1,12 +0,0 @@ -module A { - - export var x = 'hello world' - export class Point { - constructor(public x: number, public y: number) { } - } - export module B { - export interface Id { - name: string; - } - } -} \ No newline at end of file diff --git a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts b/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts deleted file mode 100644 index b8df95b7de58..000000000000 --- a/packages/typescript-estree/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts +++ /dev/null @@ -1 +0,0 @@ -declare module "hot-new-module"; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index c562892371e9..c4739a193999 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1,14 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/block-trailing-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/block-trailing-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/comment-within-condition.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/comment-within-condition.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/export-default-anonymous-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/export-default-anonymous-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsdoc-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsdoc-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-block-comment.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-block-comment.src 1`] = ` Object { "column": 10, "index": 84, @@ -17,7 +17,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-jsx.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-jsx.src 1`] = ` Object { "column": 14, "index": 48, @@ -26,7 +26,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-self-closing-jsx.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-self-closing-jsx.src 1`] = ` Object { "column": 13, "index": 47, @@ -35,7 +35,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comments.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comments.src 1`] = ` Object { "column": 9, "index": 113, @@ -44,7 +44,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-multiline-non-comment.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-multiline-non-comment.src 1`] = ` Object { "column": 5, "index": 81, @@ -53,7 +53,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-url.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-url.src 1`] = ` Object { "column": 17, "index": 17, @@ -62,7 +62,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-greather-than.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-greather-than.src 1`] = ` Object { "column": 0, "index": 69, @@ -71,7 +71,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-operators.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-operators.src 1`] = ` Object { "column": 0, "index": 69, @@ -80,57 +80,57 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/line-comment-with-block-syntax.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/line-comment-with-block-syntax.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/mix-line-and-block-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/mix-line-and-block-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-regex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-regex.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-template.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-template.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-call-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-call-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-debugger-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-debugger-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-return-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-return-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-throw-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-throw-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-while-loop-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-while-loop-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment-in-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-nested-functions.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-nested-functions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/template-string-block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/template-string-block.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/type-assertion-regression-test.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/type-assertion-regression-test.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literal-in-lhs.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param-with-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param-with-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic-in-binary-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body-not-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body-not-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-missing-paren.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-missing-paren.src 1`] = ` Object { "column": 9, "index": 9, @@ -139,7 +139,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src 1`] = ` Object { "column": 26, "index": 26, @@ -148,7 +148,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src 1`] = ` Object { "column": 5, "index": 5, @@ -157,7 +157,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src 1`] = ` Object { "column": 9, "index": 9, @@ -166,7 +166,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src 1`] = ` Object { "column": 1, "index": 1, @@ -175,15 +175,15 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-dup-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src 1`] = ` Object { "column": 21, "index": 21, @@ -192,17 +192,17 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-names.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-names.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src 1`] = ` Object { "column": 1, "index": 12, @@ -211,7 +211,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src 1`] = ` Object { "column": 6, "index": 6, @@ -220,63 +220,63 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/iife.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/iife.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/multiple-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/multiple-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/no-auto-return.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/no-auto-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-octal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-arrow-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-sequence.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-sequence.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-return-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/and-operator-array-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/and-operator-array-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/delete-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/delete-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/do-while-statements.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/do-while-statements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/identifiers-double-underscore.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/identifiers-double-underscore.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/instanceof.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/instanceof.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-with-member-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-with-member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-without-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-without-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/or-operator-array-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/or-operator-array-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/typeof-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/typeof-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/update-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/update-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/void-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/void-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/binary.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/binary.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/decimal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/decimal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/hex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/hex.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src 1`] = ` Object { "column": 4, "index": 4, @@ -285,83 +285,83 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let-in-switchcase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let-in-switchcase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/mixed-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/mixed-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-accessor-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-accessor-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-computed-static-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-computed-static-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-prototype.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-prototype.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-static.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-static.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-with-space.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-with-space.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method-super.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method-super.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-prototype.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-prototype.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-static.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-static.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-methods-and-accessor-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-computed-static-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-computed-static-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-computed-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-computed-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-three-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-three-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-two-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-two-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-static-methods-named-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-parameters.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-with-space.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-with-space.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-assign-to-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-assign-to-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-double-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-double-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-literal-derived-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-literal-derived-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src 1`] = ` Object { "column": 0, "index": 0, @@ -370,7 +370,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src 1`] = ` Object { "column": 14, "index": 14, @@ -379,7 +379,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src 1`] = ` Object { "column": 18, "index": 18, @@ -388,85 +388,85 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-derived-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-derived-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/not-all-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/not-all-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-member.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-to-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-to-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-var-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-assign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-assign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-mixed-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-array-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-array-catch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src 1`] = ` Object { "column": 0, "index": 0, @@ -475,83 +475,83 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-multi-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-multi-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/sparse-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/sparse-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-short.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-forOf/loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-forOf/loop.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/complex-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/complex-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructured-array-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructuring-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructuring-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` Object { "column": 1, "index": 1, @@ -560,11 +560,11 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/multi-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/multi-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src 1`] = ` Object { "column": 1, "index": 1, @@ -573,47 +573,47 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/single-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/single-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-complex-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-multi-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-single-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/block.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/directive-in-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/directive-in-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/first-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/first-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/function-non-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/function-non-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-directive-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-directive-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-unique-directive.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-unique-directive.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program-order.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program-order.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/raw.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/raw.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-generators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-generators.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-iterator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src 1`] = ` Object { "column": 18, "index": 18, @@ -622,51 +622,51 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/property-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/single-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/two-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-loop.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-coma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-coma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-let.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-bare-nonstrict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-bare-nonstrict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object.src 1`] = ` Object { "column": 14, "index": 14, @@ -675,29 +675,29 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object-with-body.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object-with-body.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-assigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-assigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-bare-assigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-bare-assigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-milti-asigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-milti-asigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src 1`] = ` Object { "column": 9, "index": 9, @@ -706,143 +706,143 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/anonymous-generator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/anonymous-generator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/double-yield.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/double-yield.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/empty-generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/empty-generator-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/generator-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-delegation.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-delegation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-in-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-in-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-no-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-no-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-no-arg.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-no-arg.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/importMeta/simple-import-meta.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/importMeta/simple-import-meta.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-break.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-break.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-continue.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-continue.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-delete.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-delete.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-value.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-batch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-batch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-anonymous-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-anonymous-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-namespace-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-as.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-as.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-jquery.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-jquery.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-module.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-namespace-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-namespace-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-null-as-nil.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-null-as-nil.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-await.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-await.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src 1`] = ` Object { "column": 0, "index": 9, @@ -851,7 +851,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src 1`] = ` Object { "column": 9, "index": 9, @@ -860,7 +860,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src 1`] = ` Object { "column": 20, "index": 20, @@ -869,7 +869,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src 1`] = ` Object { "column": 15, "index": 15, @@ -878,7 +878,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src 1`] = ` Object { "column": 17, "index": 17, @@ -887,9 +887,9 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src 1`] = ` Object { "column": 16, "index": 16, @@ -898,7 +898,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src 1`] = ` Object { "column": 12, "index": 12, @@ -907,7 +907,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src 1`] = ` Object { "column": 7, "index": 7, @@ -916,7 +916,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src 1`] = ` Object { "column": 12, "index": 12, @@ -925,7 +925,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src 1`] = ` Object { "column": 17, "index": 17, @@ -934,7 +934,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src 1`] = ` Object { "column": 0, "index": 11, @@ -943,7 +943,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src 1`] = ` Object { "column": 16, "index": 16, @@ -952,7 +952,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src 1`] = ` Object { "column": 0, "index": 20, @@ -961,7 +961,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src 1`] = ` Object { "column": 18, "index": 18, @@ -970,7 +970,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src 1`] = ` Object { "column": 12, "index": 12, @@ -979,7 +979,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src 1`] = ` Object { "column": 15, "index": 15, @@ -988,7 +988,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src 1`] = ` Object { "column": 0, "index": 24, @@ -997,7 +997,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src 1`] = ` Object { "column": 16, "index": 16, @@ -1006,7 +1006,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src 1`] = ` Object { "column": 12, "index": 12, @@ -1015,7 +1015,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src 1`] = ` Object { "column": 12, "index": 12, @@ -1024,7 +1024,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src 1`] = ` Object { "column": 9, "index": 9, @@ -1033,7 +1033,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src 1`] = ` Object { "column": 8, "index": 8, @@ -1042,7 +1042,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src 1`] = ` Object { "column": 25, "index": 25, @@ -1051,21 +1051,21 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteral/object-literal-in-lhs.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = ` Object { "column": 0, "index": 20, @@ -1074,7 +1074,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = ` Object { "column": 5, "index": 5, @@ -1083,13 +1083,13 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` Object { "column": 1, "index": 62, @@ -1098,9 +1098,9 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` Object { "column": 1, "index": 39, @@ -1109,9 +1109,9 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = ` Object { "column": 13, "index": 19, @@ -1120,23 +1120,23 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src 1`] = ` Object { "column": 4, "index": 4, @@ -1145,29 +1145,29 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/strict-uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/strict-uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regex/regexp-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regex/regexp-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-extended-escape.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexYFlag/regexp-y-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexYFlag/regexp-y-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/basic-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/basic-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src 1`] = ` Object { "column": 17, "index": 17, @@ -1176,7 +1176,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src 1`] = ` Object { "column": 14, "index": 14, @@ -1185,31 +1185,31 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/invalid-rest-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/invalid-rest-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/single-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/single-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float-negative.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-null.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number-negative.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/complex-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/complex-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-if.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-if.src 1`] = ` Object { "column": 6, "index": 6, @@ -1218,7 +1218,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src 1`] = ` Object { "column": 4, "index": 4, @@ -1227,35 +1227,35 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/not-final-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/not-final-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/simple-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/simple-function-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/deeply-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/deeply-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/error-octal-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/error-octal-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/escape-characters.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/escape-characters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/expressions.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/expressions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/multi-line-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/multi-line-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/simple-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/simple-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/single-dollar-sign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/single-dollar-sign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-no-placeholders.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-no-placeholders.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = ` Object { "column": 4, "index": 4, @@ -1264,7 +1264,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = ` Object { "column": 10, "index": 10, @@ -1273,7 +1273,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/attributes.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/attributes.src 1`] = ` Object { "column": 5, "index": 5, @@ -1282,7 +1282,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/element-keyword-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/element-keyword-name.src 1`] = ` Object { "column": 12, "index": 18, @@ -1291,7 +1291,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-comment.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-comment.src 1`] = ` Object { "column": 30, "index": 30, @@ -1300,7 +1300,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-conditional.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-conditional.src 1`] = ` Object { "column": 3, "index": 3, @@ -1309,7 +1309,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-invalid-js-identifier.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-invalid-js-identifier.src 1`] = ` Object { "column": 9, "index": 9, @@ -1318,7 +1318,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src 1`] = ` Object { "column": 11, "index": 11, @@ -1327,7 +1327,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/empty-placeholder.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/empty-placeholder.src 1`] = ` Object { "column": 7, "index": 7, @@ -1336,7 +1336,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns.src 1`] = ` Object { "column": 3, "index": 3, @@ -1345,7 +1345,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src 1`] = ` Object { "column": 3, "index": 3, @@ -1354,7 +1354,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src 1`] = ` Object { "column": 5, "index": 5, @@ -1363,7 +1363,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src 1`] = ` Object { "column": 3, "index": 3, @@ -1372,7 +1372,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src 1`] = ` Object { "column": 9, "index": 9, @@ -1381,7 +1381,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src 1`] = ` Object { "column": 11, "index": 11, @@ -1390,7 +1390,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src 1`] = ` Object { "column": 9, "index": 9, @@ -1399,7 +1399,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src 1`] = ` Object { "column": 1, "index": 1, @@ -1408,7 +1408,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src 1`] = ` Object { "column": 5, "index": 5, @@ -1417,7 +1417,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src 1`] = ` Object { "column": 4, "index": 4, @@ -1426,7 +1426,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src 1`] = ` Object { "column": 6, "index": 6, @@ -1435,7 +1435,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src 1`] = ` Object { "column": 8, "index": 8, @@ -1444,7 +1444,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src 1`] = ` Object { "column": 2, "index": 2, @@ -1453,7 +1453,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src 1`] = ` Object { "column": 3, "index": 3, @@ -1462,7 +1462,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` Object { "column": 3, "index": 3, @@ -1471,7 +1471,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src 1`] = ` Object { "column": 1, "index": 1, @@ -1480,7 +1480,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src 1`] = ` Object { "column": 2, "index": 2, @@ -1489,7 +1489,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src 1`] = ` Object { "column": 5, "index": 5, @@ -1498,7 +1498,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src 1`] = ` Object { "column": 4, "index": 4, @@ -1507,7 +1507,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src 1`] = ` Object { "column": 2, "index": 2, @@ -1516,7 +1516,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src 1`] = ` Object { "column": 36, "index": 36, @@ -1525,7 +1525,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src 1`] = ` Object { "column": 38, "index": 38, @@ -1534,7 +1534,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src 1`] = ` Object { "column": 1, "index": 1, @@ -1543,7 +1543,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src 1`] = ` Object { "column": 12, "index": 12, @@ -1552,7 +1552,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src 1`] = ` Object { "column": 1, "index": 1, @@ -1561,7 +1561,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src 1`] = ` Object { "column": 3, "index": 3, @@ -1570,7 +1570,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src 1`] = ` Object { "column": 6, "index": 6, @@ -1579,7 +1579,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src 1`] = ` Object { "column": 6, "index": 6, @@ -1588,7 +1588,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/less-than-operator.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/less-than-operator.src 1`] = ` Object { "column": 6, "index": 6, @@ -1597,7 +1597,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src 1`] = ` Object { "column": 6, "index": 6, @@ -1606,7 +1606,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src 1`] = ` Object { "column": 5, "index": 5, @@ -1615,7 +1615,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src 1`] = ` Object { "column": 8, "index": 8, @@ -1624,7 +1624,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-attribute-and-value-inserted.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-attribute-and-value-inserted.src 1`] = ` Object { "column": 3, "index": 3, @@ -1633,7 +1633,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src 1`] = ` Object { "column": 2, "index": 2, @@ -1642,7 +1642,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src 1`] = ` Object { "column": 4, "index": 4, @@ -1651,7 +1651,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src 1`] = ` Object { "column": 3, "index": 3, @@ -1660,7 +1660,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-inside-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-inside-tag.src 1`] = ` Object { "column": 9, "index": 15, @@ -1669,7 +1669,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-with-newline.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-with-newline.src 1`] = ` Object { "column": 2, "index": 2, @@ -1678,7 +1678,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src 1`] = ` Object { "column": 1, "index": 1, @@ -1687,7 +1687,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment-with-child.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment-with-child.src 1`] = ` Object { "column": 1, "index": 1, @@ -1696,7 +1696,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-child.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-child.src 1`] = ` Object { "column": 15, "index": 15, @@ -1705,7 +1705,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attribute-and-regular-attribute.src 1`] = ` Object { "column": 5, "index": 5, @@ -1714,7 +1714,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attributes.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attributes.src 1`] = ` Object { "column": 5, "index": 5, @@ -1723,7 +1723,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-dots.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-dots.src 1`] = ` Object { "column": 6, "index": 6, @@ -1732,7 +1732,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-multi-dots.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-multi-dots.src 1`] = ` Object { "column": 8, "index": 8, @@ -1741,7 +1741,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/test-content.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/test-content.src 1`] = ` Object { "column": 5, "index": 5, @@ -1750,7 +1750,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/trailing-spread-operator-attribute.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/trailing-spread-operator-attribute.src 1`] = ` Object { "column": 5, "index": 5, @@ -1759,7 +1759,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/unknown-escape-pattern.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/unknown-escape-pattern.src 1`] = ` Object { "column": 3, "index": 3, @@ -1768,7 +1768,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src 1`] = ` Object { "column": 9, "index": 15, @@ -1777,7 +1777,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/test-content.src.js.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/test-content.src 1`] = ` Object { "column": 5, "index": 5, @@ -1786,13 +1786,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/export-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/import-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/isolated-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src.tsx.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src 1`] = ` Object { "column": 21, "index": 21, @@ -1801,7 +1795,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src.tsx.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src 1`] = ` Object { "column": 12, "index": 141, @@ -1810,11 +1804,11 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src 1`] = ` Object { "column": 4, "index": 43, @@ -1823,15 +1817,15 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src 1`] = ` Object { "column": 7, "index": 7, @@ -1840,41 +1834,41 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/arrow-function-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures-with-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures-with-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi-assign.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi-assign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-abstract.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-abstract.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-declare.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-declare.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-return-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-return-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src 1`] = ` Object { "column": 16, "index": 28, @@ -1883,19 +1877,19 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-and-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-and-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method-default.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src 1`] = ` Object { "column": 57, "index": 57, @@ -1904,39 +1898,39 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin-reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin-reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-computed-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-computed-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-methods.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-property-undefined.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-property-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-values.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-values.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-protected-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-public-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-public-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src 1`] = ` Object { "column": 16, "index": 28, @@ -1945,91 +1939,91 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-two-methods-computed-constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-two-methods-computed-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-default.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-underscore.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/const-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/const-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-class-with-optional-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-as-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-as-namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-const-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-const-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-multiple-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-multiple-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-alias-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-alias-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-class-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-class-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-function-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-function-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-overloads.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-overloads.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-await.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-await.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-without-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-with-constraint.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types-assignation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types-assignation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-all-property-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-all-property-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` Object { "column": 9, "index": 26, @@ -2038,159 +2032,159 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-member-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-jsdoc.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-jsdoc.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-without-type-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-without-type-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/keyof-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/keyof-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/nested-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/nested-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/non-null-assertion-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/non-null-assertion-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/null-and-undefined-type-annotations.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-escaped-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-escaped-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-typed-methods.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-typed-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/parenthesized-use-strict.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/parenthesized-use-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/symbol-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/symbol-type-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-object-without-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-object-without-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-arrow-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-arrow-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-reference-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-reference-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-bigint.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-bigint.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-boolean.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-boolean.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-false.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-false.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-never.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-never.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-symbol.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-true.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-true.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-undefined.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-unknown.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-unknown.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-void.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-void.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-method-signature.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-method-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-this.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unique-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unique-symbol.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unknown-type-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unknown-type-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-definite-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-definite-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-dotted-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-dotted-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/abstract-class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/abstract-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/type-alias.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/type-alias.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/variable.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/variable.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator-factory.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src 1`] = ` Object { "column": 17, "index": 17, @@ -2199,7 +2193,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src 1`] = ` Object { "column": 17, "index": 17, @@ -2208,7 +2202,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src 1`] = ` Object { "column": 32, "index": 32, @@ -2217,7 +2211,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src 1`] = ` Object { "column": 21, "index": 21, @@ -2226,7 +2220,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src 1`] = ` Object { "column": 0, "index": 0, @@ -2235,7 +2229,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src 1`] = ` Object { "column": 0, "index": 0, @@ -2244,9 +2238,9 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src 1`] = ` Object { "column": 7, "index": 7, @@ -2255,7 +2249,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src 1`] = ` Object { "column": 3, "index": 16, @@ -2264,7 +2258,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src 1`] = ` Object { "column": 21, "index": 21, @@ -2273,7 +2267,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src 1`] = ` Object { "column": 12, "index": 12, @@ -2282,7 +2276,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src 1`] = ` Object { "column": 2, "index": 18, @@ -2291,7 +2285,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src 1`] = ` Object { "column": 2, "index": 18, @@ -2300,7 +2294,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src 1`] = ` Object { "column": 2, "index": 18, @@ -2309,7 +2303,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src 1`] = ` Object { "column": 2, "index": 18, @@ -2318,7 +2312,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src 1`] = ` Object { "column": 2, "index": 18, @@ -2327,7 +2321,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src 1`] = ` Object { "column": 4, "index": 20, @@ -2336,7 +2330,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src 1`] = ` Object { "column": 4, "index": 20, @@ -2345,7 +2339,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src 1`] = ` Object { "column": 2, "index": 18, @@ -2354,7 +2348,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src 1`] = ` Object { "column": 4, "index": 20, @@ -2363,7 +2357,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-static.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-static.src 1`] = ` Object { "column": 2, "index": 18, @@ -2372,7 +2366,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src 1`] = ` Object { "column": 26, "index": 26, @@ -2381,7 +2375,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src 1`] = ` Object { "column": 2, "index": 18, @@ -2390,7 +2384,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src 1`] = ` Object { "column": 2, "index": 18, @@ -2399,7 +2393,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src 1`] = ` Object { "column": 2, "index": 18, @@ -2408,7 +2402,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src 1`] = ` Object { "column": 4, "index": 20, @@ -2417,7 +2411,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src 1`] = ` Object { "column": 2, "index": 18, @@ -2426,7 +2420,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src 1`] = ` Object { "column": 16, "index": 32, @@ -2435,7 +2429,7 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src.ts.src 1`] = ` +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src 1`] = ` Object { "column": 5, "index": 5, @@ -2444,108 +2438,108 @@ Object { } `; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/new-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/new-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/global-module-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/module-with-default-exports.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/nested-internal-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/array-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/array-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-in-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-in-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-with-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-in-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-in-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-this.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-without-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-without-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number-negative.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-minus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-minus.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-plus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-plus.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type-expanded.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type-expanded.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-optional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-optional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-literal.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-intersection.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-intersection.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/lib/comments.ts b/packages/typescript-estree/tests/lib/comments.ts index 7ad9695ecb18..e469c39f00ef 100644 --- a/packages/typescript-estree/tests/lib/comments.ts +++ b/packages/typescript-estree/tests/lib/comments.ts @@ -5,23 +5,22 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; +import { extname } from 'path'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { + createSnapshotTestBlock, + formatSnapshotName +} from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = './tests/fixtures/comments'; - -const testFiles = shelljs - .find(FIXTURES_DIR) - .filter( - filename => - filename.indexOf('.src.js') > -1 || filename.indexOf('.src.ts') > -1 - ); +const FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/comments'; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.*`); //------------------------------------------------------------------------------ // Tests @@ -29,19 +28,18 @@ const testFiles = shelljs describe('Comments', () => { testFiles.forEach(filename => { - const code = shelljs.cat(path.resolve(filename)); + const code = readFileSync(filename, 'utf8'); + const fileExtension = extname(filename); const config: ParserOptions = { loc: true, range: true, tokens: true, comment: true, - jsx: path.extname(filename) === '.js' + jsx: fileExtension === '.js' }; - // strip off ".src.js" and ".src.ts" - const name = filename.substring( - FIXTURES_DIR.length - 1, - filename.length - 7 + it( + formatSnapshotName(filename, FIXTURES_DIR, fileExtension), + createSnapshotTestBlock(code, config) ); - it(`fixtures/${name}.src`, createSnapshotTestBlock(code, config)); }); }); diff --git a/packages/typescript-estree/tests/lib/javascript.ts b/packages/typescript-estree/tests/lib/javascript.ts index 6635ae72f8a6..aca646998b3b 100644 --- a/packages/typescript-estree/tests/lib/javascript.ts +++ b/packages/typescript-estree/tests/lib/javascript.ts @@ -5,24 +5,21 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { + createSnapshotTestBlock, + formatSnapshotName +} from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = './tests/fixtures/javascript'; - -const testFiles = shelljs - .find(FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.js') > -1) - // strip off ".src.js" - .map(filename => - filename.substring(FIXTURES_DIR.length - 1, filename.length - 7) - ); +const FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/javascript'; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.js`); //------------------------------------------------------------------------------ // Tests @@ -30,17 +27,16 @@ const testFiles = shelljs describe('javascript', () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`), - config = { - loc: true, - range: true, - tokens: true, - errorOnUnknownASTType: true - }; - + const code = readFileSync(filename, 'utf8'); + const config: ParserOptions = { + loc: true, + range: true, + tokens: true, + errorOnUnknownASTType: true + }; it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) + formatSnapshotName(filename, FIXTURES_DIR), + createSnapshotTestBlock(code, config) ); }); }); diff --git a/packages/typescript-estree/tests/lib/jsx.ts b/packages/typescript-estree/tests/lib/jsx.ts index 406eab5ce70e..2ac95341a097 100644 --- a/packages/typescript-estree/tests/lib/jsx.ts +++ b/packages/typescript-estree/tests/lib/jsx.ts @@ -5,38 +5,30 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { + createSnapshotTestBlock, + formatSnapshotName +} from '../../tools/test-utils'; import filesWithKnownIssues from '../jsx-known-issues'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const JSX_FIXTURES_DIR = './tests/fixtures/jsx'; - -const jsxTestFiles = shelljs - .find(JSX_FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.js') > -1) +const JSX_FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/jsx'; +const jsxTestFiles = glob + .sync(`${JSX_FIXTURES_DIR}/**/*.src.js`) .filter(filename => - filesWithKnownIssues.every(fileName => filename.indexOf(fileName) === -1) - ) - // strip off ".src.js" - .map(filename => - filename.substring(JSX_FIXTURES_DIR.length - 1, filename.length - 7) + filesWithKnownIssues.every(fileName => !filename.includes(fileName)) ); -const JSX_JSXTEXT_FIXTURES_DIR = './tests/fixtures/jsx-useJSXTextNode'; - -const jsxTextTestFiles = shelljs - .find(JSX_JSXTEXT_FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.js') > -1) - // strip off ".src.js" - .map(filename => - filename.substring(JSX_JSXTEXT_FIXTURES_DIR.length - 1, filename.length - 7) - ); +const JSX_JSXTEXT_FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/jsx-useJSXTextNode'; +const jsxTextTestFiles = glob.sync(`${JSX_JSXTEXT_FIXTURES_DIR}/**/*.src.js`); //------------------------------------------------------------------------------ // Tests @@ -51,9 +43,8 @@ describe('JSX', () => { useJSXTextNode: boolean ): (filename: string) => void { return filename => { - const code = shelljs.cat(`${path.resolve(fixturesDir, filename)}.src.js`); - - const config = { + const code = readFileSync(filename, 'utf8'); + const config: ParserOptions = { loc: true, range: true, tokens: true, @@ -61,10 +52,9 @@ describe('JSX', () => { useJSXTextNode, jsx: true }; - it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) + formatSnapshotName(filename, fixturesDir), + createSnapshotTestBlock(code, config) ); }; } diff --git a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.ts b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.ts index e983e6726b29..8231b96185df 100644 --- a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.ts +++ b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.ts @@ -4,9 +4,11 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; import * as parser from '../../src/parser'; +import { extname } from 'path'; +import { formatSnapshotName } from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup @@ -16,12 +18,9 @@ import * as parser from '../../src/parser'; * Process all fixtures, we will only snapshot the ones that have semantic errors * which are ignored by default parsing logic. */ -const FIXTURES_DIR = './tests/fixtures/'; - -const testFiles = shelljs - .find(FIXTURES_DIR) - .filter(filename => filename.includes('.src.')) - .map(filename => filename.substring(FIXTURES_DIR.length - 2)); +const FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures'; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.*`); //------------------------------------------------------------------------------ // Tests @@ -29,7 +28,8 @@ const testFiles = shelljs describe('Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled', () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}`); + const code = readFileSync(filename, 'utf8'); + const fileExtension = extname(filename); const config = { loc: true, range: true, @@ -37,7 +37,7 @@ describe('Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" errorOnUnknownASTType: true, errorOnTypeScriptSyntacticAndSemanticIssues: true }; - it(`fixtures/${filename}.src`, () => { + it(formatSnapshotName(filename, FIXTURES_DIR, fileExtension), () => { expect.assertions(1); try { parser.parseAndGenerateServices(code, config); diff --git a/packages/typescript-estree/tests/lib/semanticInfo.ts b/packages/typescript-estree/tests/lib/semanticInfo.ts index db1671c9c15e..eb5af8677e97 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.ts @@ -3,34 +3,27 @@ * @author Benjamin Lichtman */ -'use strict'; - //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -import path from 'path'; -import shelljs from 'shelljs'; -import { - parseCodeAndGenerateServices, - createSnapshotTestBlock -} from '../../tools/test-utils'; +import { readFileSync } from 'fs'; +import glob from 'glob'; +import { extname, join, resolve } from 'path'; import ts from 'typescript'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; +import { + createSnapshotTestBlock, + formatSnapshotName, + parseCodeAndGenerateServices +} from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ const FIXTURES_DIR = './tests/fixtures/semanticInfo'; - -const testFiles = shelljs - .find(FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.ts') > -1) - // strip off ".src.ts" - .map(filename => - filename.substring(FIXTURES_DIR.length - 1, filename.length - 7) - ); +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.ts`); function createOptions(fileName: string): ParserOptions & { cwd?: string } { return { @@ -42,7 +35,7 @@ function createOptions(fileName: string): ParserOptions & { cwd?: string } { useJSXTextNode: false, errorOnUnknownASTType: true, filePath: fileName, - tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), + tsconfigRootDir: join(process.cwd(), FIXTURES_DIR), project: './tsconfig.json', loggerFn: false }; @@ -55,43 +48,45 @@ function createOptions(fileName: string): ParserOptions & { cwd?: string } { describe('semanticInfo', () => { // test all AST snapshots testFiles.forEach(filename => { - const fullFileName = `${path.resolve(FIXTURES_DIR, filename)}.src.ts`; - const code = shelljs.cat(fullFileName); - test( - `fixtures/${filename}.src`, + const code = readFileSync(filename, 'utf8'); + it( + formatSnapshotName(filename, FIXTURES_DIR, extname(filename)), createSnapshotTestBlock( code, - createOptions(fullFileName), + createOptions(filename), /*generateServices*/ true ) ); }); // case-specific tests - test('isolated-file tests', () => { - const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + it('isolated-file tests', () => { + const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - shelljs.cat(fileName), + readFileSync(fileName, 'utf8'), createOptions(fileName) ); testIsolatedFile(parseResult); }); - test('isolated-vue-file tests', () => { - const fileName = path.resolve(FIXTURES_DIR, 'extra-file-extension.vue'); - const parseResult = parseCodeAndGenerateServices(shelljs.cat(fileName), { - ...createOptions(fileName), - extraFileExtensions: ['.vue'] - }); + it('isolated-vue-file tests', () => { + const fileName = resolve(FIXTURES_DIR, 'extra-file-extension.vue'); + const parseResult = parseCodeAndGenerateServices( + readFileSync(fileName, 'utf8'), + { + ...createOptions(fileName), + extraFileExtensions: ['.vue'] + } + ); testIsolatedFile(parseResult); }); - test('imported-file tests', () => { - const fileName = path.resolve(FIXTURES_DIR, 'import-file.src.ts'); + it('imported-file tests', () => { + const fileName = resolve(FIXTURES_DIR, 'import-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - shelljs.cat(fileName), + readFileSync(fileName, 'utf8'), createOptions(fileName) ); @@ -117,7 +112,7 @@ describe('semanticInfo', () => { ).toBe(arrayBoundName); }); - test('non-existent file tests', () => { + it('non-existent file tests', () => { const parseResult = parseCodeAndGenerateServices( `const x = [parseInt("5")];`, createOptions('') @@ -143,7 +138,7 @@ describe('semanticInfo', () => { ); }); - test('non-existent file should provide parents nodes', () => { + it('non-existent file should provide parents nodes', () => { const parseResult = parseCodeAndGenerateServices( `function M() { return Base }`, createOptions('') @@ -160,30 +155,30 @@ describe('semanticInfo', () => { ).toBeDefined(); }); - test('non-existent project file', () => { - const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + it('non-existent project file', () => { + const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './tsconfigs.json'; expect(() => - parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig) ).toThrowError(/File .+tsconfigs\.json' not found/); }); - test('fail to read project file', () => { - const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + it('fail to read project file', () => { + const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = '.'; expect(() => - parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig) ).toThrowError(/File .+semanticInfo' not found/); }); - test('malformed project file', () => { - const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + it('malformed project file', () => { + const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './badTSConfig/tsconfig.json'; expect(() => - parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig) ).toThrowErrorMatchingSnapshot(); }); }); diff --git a/packages/typescript-estree/tests/lib/tsx.ts b/packages/typescript-estree/tests/lib/tsx.ts index 7efddecf276e..8d4230a2c91f 100644 --- a/packages/typescript-estree/tests/lib/tsx.ts +++ b/packages/typescript-estree/tests/lib/tsx.ts @@ -4,24 +4,22 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; +import { extname } from 'path'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { + createSnapshotTestBlock, + formatSnapshotName +} from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const TSX_FIXTURES_DIR = './tests/fixtures/tsx'; - -const testFiles = shelljs - .find(TSX_FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.tsx') > -1) - // strip off ".src.tsx" - .map(filename => - filename.substring(TSX_FIXTURES_DIR.length - 1, filename.length - 8) - ); +const FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/tsx'; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.tsx`); //------------------------------------------------------------------------------ // Tests @@ -29,10 +27,8 @@ const testFiles = shelljs describe('TSX', () => { testFiles.forEach(filename => { - const code = shelljs.cat( - `${path.resolve(TSX_FIXTURES_DIR, filename)}.src.tsx` - ); - const config = { + const code = readFileSync(filename, 'utf8'); + const config: ParserOptions = { loc: true, range: true, tokens: true, @@ -41,8 +37,8 @@ describe('TSX', () => { jsx: true }; it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) + formatSnapshotName(filename, FIXTURES_DIR, extname(filename)), + createSnapshotTestBlock(code, config) ); }); }); diff --git a/packages/typescript-estree/tests/lib/typescript.ts b/packages/typescript-estree/tests/lib/typescript.ts index 92a2092caf38..dabfac14def4 100644 --- a/packages/typescript-estree/tests/lib/typescript.ts +++ b/packages/typescript-estree/tests/lib/typescript.ts @@ -5,24 +5,22 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import path from 'path'; -import shelljs from 'shelljs'; +import { readFileSync } from 'fs'; +import glob from 'glob'; +import { extname } from 'path'; import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { + createSnapshotTestBlock, + formatSnapshotName +} from '../../tools/test-utils'; //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = './tests/fixtures/typescript'; - -const testFiles = shelljs - .find(FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.ts') > -1) - // strip off ".src.ts" - .map(filename => - filename.substring(FIXTURES_DIR.length - 1, filename.length - 7) - ); +const FIXTURES_DIR = + '../../node_modules/@typescript-eslint/shared-fixtures/fixtures/typescript'; +const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.ts`); //------------------------------------------------------------------------------ // Tests @@ -30,16 +28,16 @@ const testFiles = shelljs describe('typescript', () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.ts`); - const config = { + const code = readFileSync(filename, 'utf8'); + const config: ParserOptions = { loc: true, range: true, tokens: true, errorOnUnknownASTType: true }; it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) + formatSnapshotName(filename, FIXTURES_DIR, extname(filename)), + createSnapshotTestBlock(code, config) ); }); }); diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index d167d496babb..dc507d78e1e8 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -69,3 +69,13 @@ export function createSnapshotTestBlock( } }; } + +export function formatSnapshotName( + filename: string, + fixturesDir: string, + fileExtension = '.js' +): string { + return `fixtures/${filename + .replace(fixturesDir + '/', '') + .replace(fileExtension, '')}`; +} diff --git a/yarn.lock b/yarn.lock index f18b0d5be8ae..6d9887af7619 100644 --- a/yarn.lock +++ b/yarn.lock @@ -793,7 +793,7 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== -"@types/glob@*": +"@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== @@ -841,14 +841,6 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== -"@types/shelljs@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.1.tgz#133e874b5fb816a2e1c8647839c82d76760b1191" - integrity sha512-1lQw+48BuVgp6c1+z8EMipp18IdnV2dLh6KQGwOm+kJy9nPjEkaqRKmwbDNEYf//EKBvKcwOC6V2cDrNxVoQeQ== - dependencies: - "@types/glob" "*" - "@types/node" "*" - JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -3007,7 +2999,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: +glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -3342,11 +3334,6 @@ inquirer@^6.2.0: strip-ansi "^5.0.0" through "^2.3.6" -interpret@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -5836,13 +5823,6 @@ realpath-native@^1.0.0: dependencies: util.promisify "^1.0.0" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -6015,7 +5995,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.x, resolve@^1.1.6: +resolve@1.x: version "1.9.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== @@ -6185,15 +6165,6 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shelljs@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" - integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"