From d15e2c7d4ab03851521b45ebcea1e60619411586 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 10 Nov 2018 14:28:22 +0800 Subject: [PATCH 1/3] feat: typed parser return value --- src/parser.ts | 25 +++++++++++++++++++++---- src/temp-types-based-on-js-source.ts | 16 ++++++++-------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/parser.ts b/src/parser.ts index 3d7c5d0..29de065 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -8,7 +8,13 @@ import semver from 'semver'; import ts from 'typescript'; import convert from './ast-converter'; -import { Extra, ParserOptions } from './temp-types-based-on-js-source'; +import { + Extra, + ParserOptions, + ESTreeToken, + ESTreeComment +} from './temp-types-based-on-js-source'; +import { Program } from './estree/spec'; const packageJSON = require('../package.json'); @@ -46,13 +52,21 @@ function resetExtra(): void { // Parser //------------------------------------------------------------------------------ +type ParserResult = Program & + (T['range'] extends true ? { range: [number, number] } : {}) & + (T['tokens'] extends true ? { tokens: ESTreeToken[] } : {}) & + (T['comment'] extends true ? { comments: ESTreeComment[] } : {}); + /** * Parses the given source code to produce a valid AST * @param {string} code TypeScript code * @param {ParserOptions} options configuration object for the parser * @returns {Object} the AST */ -function generateAST(code: string, options: ParserOptions): any { +function generateAST( + code: string, + options?: T +): ParserResult { const toString = String; if (typeof code !== 'string' && !((code as any) instanceof String)) { @@ -182,6 +196,9 @@ export { version }; const version = packageJSON.version; -export function parse(code: string, options: ParserOptions) { - return generateAST(code, options); +export function parse( + code: string, + options?: T +) { + return generateAST(code, options); } diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index 9fe32a5..1cba4a1 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -69,12 +69,12 @@ export interface Extra { } export interface ParserOptions { - range: boolean; - loc: boolean; - tokens: boolean; - comment: boolean; - jsx: boolean; - errorOnUnknownASTType: boolean; - useJSXTextNode: boolean; - loggerFn: Function | false; + range?: boolean; + loc?: boolean; + tokens?: boolean; + comment?: boolean; + jsx?: boolean; + errorOnUnknownASTType?: boolean; + useJSXTextNode?: boolean; + loggerFn?: Function | false; } From 96afa6346b9d3aa375d83b7e55a554876dc059d5 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 24 Nov 2018 00:20:06 +0800 Subject: [PATCH 2/3] chore: merge conflicts --- package.json | 1 + src/ast-converter.ts | 24 +- src/convert.ts | 130 +- src/node-utils.ts | 95 +- src/parser.ts | 216 +- src/temp-types-based-on-js-source.ts | 5 + src/tsconfig-parser.ts | 149 + .../arrayLiteral/array-literal-in-lhs.src.js | 0 .../array-literals-in-binary-expr.src.js | 0 .../as-param-with-params.src.js | 0 .../arrowFunctions/as-param.src.js | 0 .../basic-in-binary-expression.src.js | 0 .../arrowFunctions/basic.src.js | 0 .../block-body-not-object.src.js | 0 .../arrowFunctions/block-body.src.js | 0 .../arrowFunctions/error-dup-params.src.js | 0 .../arrowFunctions/error-missing-paren.src.js | 0 .../arrowFunctions/error-not-arrow.src.js | 0 .../error-numeric-param-multi.src.js | 0 .../arrowFunctions/error-numeric-param.src.js | 0 .../arrowFunctions/error-reverse-arrow.src.js | 0 .../error-strict-default-param-eval.src.js | 0 .../error-strict-dup-params.src.js | 0 .../error-strict-eval-return.src.js | 0 .../arrowFunctions/error-strict-eval.src.js | 0 .../arrowFunctions/error-strict-octal.src.js | 0 .../error-strict-param-arguments.src.js | 0 .../error-strict-param-eval.src.js | 0 .../error-strict-param-names.src.js | 0 ...ror-strict-param-no-paren-arguments.src.js | 0 .../error-strict-param-no-paren-eval.src.js | 0 .../arrowFunctions/error-two-lines.src.js | 0 .../arrowFunctions/error-wrapped-param.src.js | 0 .../arrowFunctions/expression.src.js | 0 .../arrowFunctions/iife.src.js | 0 .../arrowFunctions/multiple-params.src.js | 0 .../arrowFunctions/no-auto-return.src.js | 0 .../not-strict-arguments.src.js | 0 .../not-strict-eval-params.src.js | 0 .../arrowFunctions/not-strict-eval.src.js | 0 .../arrowFunctions/not-strict-octal.src.js | 0 .../return-arrow-function.src.js | 0 .../arrowFunctions/return-sequence.src.js | 0 .../arrowFunctions/single-param-parens.src.js | 0 .../single-param-return-identifier.src.js | 0 .../arrowFunctions/single-param.src.js | 0 .../basics/delete-expression.src.js | 0 .../basics/do-while-statements.src.js | 0 .../identifiers-double-underscore.src.js | 0 .../{ => javascript}/basics/instanceof.src.js | 0 .../basics/new-with-member-expression.src.js | 0 .../basics/new-without-parens.src.js | 0 .../basics/typeof-expression.src.js | 0 .../basics/update-expression.src.js | 0 .../basics/void-expression.src.js | 0 .../binaryLiterals/invalid.src.js | 0 .../binaryLiterals/lowercase.src.js | 0 .../binaryLiterals/uppercase.src.js | 0 .../blockBindings/const.src.js | 0 .../blockBindings/let-in-switchcase.src.js | 0 .../blockBindings/let.src.js | 0 .../classes/class-accessor-properties.src.js | 0 .../class-computed-static-method.src.js | 0 .../classes/class-expression.src.js | 0 .../class-method-named-prototype.src.js | 0 .../classes/class-method-named-static.src.js | 0 .../class-method-named-with-space.src.js | 0 .../classes/class-one-method-super.src.js | 0 .../classes/class-one-method.src.js | 0 ...class-static-method-named-prototype.src.js | 0 .../class-static-method-named-static.src.js | 0 .../classes/class-static-method.src.js | 0 ...tic-methods-and-accessor-properties.src.js | 0 .../class-two-computed-static-methods.src.js | 0 ...ss-two-methods-computed-constructor.src.js | 0 .../classes/class-two-methods-semi.src.js | 0 .../class-two-methods-three-semi.src.js | 0 .../classes/class-two-methods-two-semi.src.js | 0 .../classes/class-two-methods.src.js | 0 ...wo-static-methods-named-constructor.src.js | 0 .../class-with-constructor-parameters.src.js | 0 .../class-with-constructor-with-space.src.js | 0 .../classes/class-with-constructor.src.js | 0 .../derived-class-assign-to-var.src.js | 0 .../classes/derived-class-expression.src.js | 0 .../classes/empty-class-double-semi.src.js | 0 .../classes/empty-class-semi.src.js | 0 .../classes/empty-class.src.js | 0 .../empty-literal-derived-class.src.js | 0 .../classes/invalid-class-declaration.src.js | 0 .../invalid-class-setter-declaration.src.js | 0 .../invalid-class-two-super-classes.src.js | 0 .../classes/named-class-expression.src.js | 0 .../named-derived-class-expression.src.js | 0 .../defaultParams/class-constructor.src.js | 0 .../defaultParams/class-method.src.js | 0 .../defaultParams/declaration.src.js | 0 .../defaultParams/expression.src.js | 0 .../defaultParams/method.src.js | 0 .../defaultParams/not-all-params.src.js | 0 .../arrow-param-array.src.js | 0 .../arrow-param-nested-array.src.js | 0 .../arrow-param-nested-object-named.src.js | 0 .../arrow-param-nested-object.src.js | 0 .../arrow-param-object.src.js | 0 .../param-defaults-array.src.js | 0 .../param-defaults-object-nested.src.js | 0 .../param-defaults-object.src.js | 0 .../array-const-undefined.src.js | 0 .../array-let-undefined.src.js | 0 .../object-const-named.src.js | 0 .../object-const-undefined.src.js | 0 .../object-let-named.src.js | 0 .../object-let-undefined.src.js | 0 .../param-array.src.js | 0 .../param-object-short.src.js | 0 .../param-object-wrapped.src.xjs | 0 .../param-object.src.js | 0 .../destructuring-and-forOf/loop.src.js | 0 .../complex-destructured.src.js | 0 .../destructured-array-literal.src.js | 0 .../destructuring-param.src.js | 0 ...r-complex-destructured-spread-first.src.js | 0 .../invalid-not-final-array-empty.src.xjs | 0 .../multi-destructured.src.js | 0 .../not-final-array.src.xjs | 0 .../single-destructured.src.js | 0 .../var-complex-destructured.src.js | 0 .../var-destructured-array-literal.src.js | 0 .../var-multi-destructured.src.js | 0 .../var-single-destructured.src.js | 0 .../destructuring/array-member.src.js | 0 .../destructuring/array-to-array.src.js | 0 .../destructuring/array-var-undefined.src.js | 0 .../class-constructor-params-array.src.js | 0 ...s-constructor-params-defaults-array.src.js | 0 ...-constructor-params-defaults-object.src.js | 0 .../class-constructor-params-object.src.js | 0 .../class-method-params-array.src.js | 0 .../class-method-params-defaults-array.src.js | 0 ...class-method-params-defaults-object.src.js | 0 .../class-method-params-object.src.js | 0 .../destructuring/defaults-array-all.src.js | 0 ...efaults-array-longform-nested-multi.src.js | 0 .../destructuring/defaults-array-multi.src.js | 0 .../defaults-array-nested-all.src.js | 0 .../defaults-array-nested-multi.src.js | 0 .../destructuring/defaults-array.src.js | 0 .../destructuring/defaults-object-all.src.js | 0 .../defaults-object-longform-all.src.js | 0 .../defaults-object-longform-multi.src.js | 0 .../defaults-object-longform.src.js | 0 .../defaults-object-mixed-multi.src.js | 0 .../defaults-object-multi.src.js | 0 .../defaults-object-nested-all.src.js | 0 .../defaults-object-nested-multi.src.js | 0 .../destructuring/defaults-object.src.js | 0 .../destructured-array-catch.src.js | 0 .../destructured-object-catch.src.js | 0 .../invalid-defaults-object-assign.src.js | 0 .../destructuring/named-param.src.js | 0 .../destructuring/nested-array.src.js | 0 .../destructuring/nested-object.src.js | 0 .../destructuring/object-var-named.src.js | 0 .../destructuring/object-var-undefined.src.js | 0 .../destructuring/param-defaults-array.src.js | 0 .../param-defaults-object-nested.src.js | 0 .../param-defaults-object.src.js | 0 .../destructuring/params-array-wrapped.src.js | 0 .../destructuring/params-array.src.js | 0 .../destructuring/params-multi-object.src.js | 0 .../destructuring/params-nested-array.src.js | 0 .../destructuring/params-nested-object.src.js | 0 .../params-object-wrapped.src.js | 0 .../destructuring/params-object.src.js | 0 .../destructuring/sparse-array.src.js | 0 .../async-generators.src.js | 0 .../async-iterator.src.js | 0 .../dynamic-import.src.js | 0 .../arg-spread.src.js | 0 .../destructuring-assign-mirror.src.js | 0 .../function-parameter-object-spread.src.js | 0 .../invalid-rest-trailing-comma.src.js | 0 .../invalid-rest.src.js | 0 .../object-rest.src.js | 0 .../property-spread.src.js | 0 .../shorthand-method-args.src.js | 0 .../shorthand-methods.src.js | 0 .../shorthand-properties.src.js | 0 .../single-spread.src.js | 0 .../spread-trailing-comma.src.js | 0 .../two-spread.src.js | 0 .../optional-catch-binding-finally.src.js | 0 .../optional-catch-binding.src.js | 0 .../exponential-operators.src.js | 0 .../for-of-with-function-initializer.src.js | 0 .../forOf/for-of-with-var-and-braces.src.js | 0 .../for-of-with-var-and-no-braces.src.js | 0 ...lid-for-of-with-const-and-no-braces.src.js | 0 ...valid-for-of-with-let-and-no-braces.src.js | 0 .../generators/anonymous-generator.src.js | 0 .../async-generator-function.src.js | 0 .../generators/async-generator-method.src.js | 0 .../generators/double-yield.src.js | 0 .../empty-generator-declaration.src.js | 0 .../generators/generator-declaration.src.js | 0 .../generators/yield-delegation.src.js | 0 .../yield-without-value-in-call.src.js | 0 .../yield-without-value-no-semi.src.js | 0 .../generators/yield-without-value.src.js | 0 .../globalReturn/return-identifier.src.js | 0 .../globalReturn/return-no-arg.src.js | 0 .../globalReturn/return-true.src.js | 0 .../importMeta/simple-import-meta.src.js | 0 .../modules/error-delete.src.js | 0 .../modules/error-function.src.js | 0 .../modules/error-strict.src.js | 0 .../modules/export-default-array.src.js | 0 .../modules/export-default-class.src.js | 0 .../modules/export-default-expression.src.js | 0 .../modules/export-default-function.src.js | 0 .../modules/export-default-named-class.src.js | 0 .../export-default-named-function.src.js | 0 .../modules/export-default-number.src.js | 0 .../modules/export-default-object.src.js | 0 .../modules/export-default-value.src.js | 0 .../modules/export-from-batch.src.js | 0 .../modules/export-from-default.src.js | 0 .../export-from-named-as-default.src.js | 0 .../export-from-named-as-specifier.src.js | 0 .../export-from-named-as-specifiers.src.js | 0 .../modules/export-from-specifier.src.js | 0 .../modules/export-from-specifiers.src.js | 0 .../modules/export-function.src.js | 0 .../modules/export-named-as-default.src.js | 0 .../modules/export-named-as-specifier.src.js | 0 .../modules/export-named-as-specifiers.src.js | 0 .../modules/export-named-class.src.js | 0 .../modules/export-named-empty.src.js | 0 .../modules/export-named-specifier.src.js | 0 .../export-named-specifiers-comma.src.js | 0 .../modules/export-named-specifiers.src.js | 0 .../export-var-anonymous-function.src.js | 0 .../modules/export-var-number.src.js | 0 .../modules/export-var.src.js | 0 ...import-default-and-named-specifiers.src.js | 0 ...rt-default-and-namespace-specifiers.src.js | 0 .../modules/import-default-as.src.js | 0 .../modules/import-default.src.js | 0 .../modules/import-jquery.src.js | 0 .../modules/import-module.src.js | 0 .../modules/import-named-as-specifier.src.js | 0 .../modules/import-named-as-specifiers.src.js | 0 .../modules/import-named-empty.src.js | 0 .../modules/import-named-specifier.src.js | 0 .../import-named-specifiers-comma.src.js | 0 .../modules/import-named-specifiers.src.js | 0 .../modules/import-namespace-specifier.src.js | 0 .../modules/import-null-as-nil.src.js | 0 .../modules/invalid-await.src.js | 0 .../modules/invalid-class.src.js | 0 ...id-export-batch-missing-from-clause.src.js | 0 .../modules/invalid-export-batch-token.src.js | 0 .../invalid-export-default-equal.src.js | 0 .../invalid-export-default-token.src.js | 0 .../modules/invalid-export-default.src.js | 0 .../invalid-export-named-default.src.js | 0 .../invalid-export-named-extra-comma.src.js | 0 .../invalid-export-named-middle-comma.src.js | 0 ...t-default-after-named-after-default.src.js | 0 .../invalid-import-default-after-named.src.js | 0 ...rt-default-missing-module-specifier.src.js | 0 ...lid-import-default-module-specifier.src.js | 0 .../modules/invalid-import-default.src.js | 0 ...lid-import-missing-module-specifier.src.js | 0 .../invalid-import-module-specifier.src.js | 0 .../invalid-import-named-after-named.src.js | 0 ...nvalid-import-named-after-namespace.src.js | 0 ...nvalid-import-named-as-missing-from.src.js | 0 .../invalid-import-named-extra-comma.src.js | 0 .../invalid-import-named-middle-comma.src.js | 0 ...nvalid-import-namespace-after-named.src.js | 0 ...invalid-import-namespace-missing-as.src.js | 0 .../newTarget/invalid-new-target.src.js | 0 .../newTarget/invalid-unknown-property.src.js | 0 .../newTarget/simple-new-target.src.js | 0 .../object-literal-in-lhs.src.js | 0 .../computed-addition-property.src.js | 0 .../computed-and-identifier.src.js | 0 .../computed-getter-and-setter.src.js | 0 .../computed-string-property.src.js | 0 .../computed-variable-property.src.js | 0 .../invalid-computed-variable-property.src.js | 0 ...andalone-computed-variable-property.src.js | 0 ...standalone-expression-with-addition.src.js | 0 .../standalone-expression-with-method.src.js | 0 .../standalone-expression.src.js | 0 .../error-proto-property.src.js | 0 .../error-proto-string-property.src.js | 0 .../strict-duplicate-properties.src.js | 0 .../strict-duplicate-string-properties.src.js | 0 .../invalid-method-no-braces.src.js | 0 .../method-property.src.js | 0 .../simple-method-named-get.src.js | 0 .../simple-method-named-set.src.js | 0 .../simple-method-with-argument.src.js | 0 .../simple-method-with-string-name.src.js | 0 .../simple-method.src.js | 0 .../string-name-method-property.src.js | 0 .../shorthand-properties.src.js | 0 .../octalLiterals/invalid.src.js | 0 .../octalLiterals/lowercase.src.js | 0 .../octalLiterals/strict-uppercase.src.js | 0 .../octalLiterals/uppercase.src.js | 0 .../regex/regexp-simple.src.js | 0 .../regexUFlag/regex-u-extended-escape.src.js | 0 .../regex-u-invalid-extended-escape.src.js | 0 .../regexUFlag/regex-u-simple.src.js | 0 .../regexYFlag/regexp-y-simple.src.js | 0 .../restParams/basic-rest.src.js | 0 .../restParams/class-constructor.src.js | 0 .../restParams/class-method.src.js | 0 .../restParams/error-no-default.src.js | 0 .../restParams/error-not-last.src.js | 0 .../restParams/func-expression-multi.src.js | 0 .../restParams/func-expression.src.js | 0 .../restParams/invalid-rest-param.src.js | 0 .../restParams/single-rest.src.js | 0 .../spread/error-invalid-if.src.js | 0 .../spread/error-invalid-sequence.src.js | 0 .../spread/multi-function-call.src.js | 0 .../spread/not-final-param.src.js | 0 .../spread/simple-function-call.src.js | 0 .../templateStrings/deeply-nested.src.js | 0 .../error-octal-literal.src.js | 0 .../templateStrings/escape-characters.src.js | 0 .../templateStrings/expressions.src.js | 0 .../multi-line-template-string.src.js | 0 .../simple-template-string.src.js | 0 .../templateStrings/single-dollar-sign.src.js | 0 .../tagged-no-placeholders.src.js | 0 .../tagged-template-string.src.js | 0 .../basic-string-literal.src.js | 0 .../complex-string-literal.src.js | 0 .../invalid-empty-escape.src.js | 0 .../invalid-too-large-escape.src.js | 0 .../fixtures/semanticInfo/badTSConfig/app.ts | 0 .../semanticInfo/badTSConfig/tsconfig.json | 9 + .../fixtures/semanticInfo/export-file.src.ts | 1 + .../fixtures/semanticInfo/import-file.src.ts | 2 + .../semanticInfo/isolated-file.src.ts | 1 + tests/fixtures/semanticInfo/tsconfig.json | 8 + tests/lib/__snapshots__/basics.ts.snap | 3140 -------------- ...ma-features.ts.snap => javascript.ts.snap} | 3793 +++++++++++++++-- tests/lib/__snapshots__/semanticInfo.ts.snap | 1136 +++++ tests/lib/basics.ts | 45 - tests/lib/{ecma-features.ts => javascript.ts} | 4 +- tests/lib/semanticInfo.ts | 196 + tools/test-utils.ts | 19 +- 359 files changed, 5337 insertions(+), 3637 deletions(-) create mode 100644 src/tsconfig-parser.ts rename tests/fixtures/{ecma-features => javascript}/arrayLiteral/array-literal-in-lhs.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrayLiteral/array-literals-in-binary-expr.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/as-param-with-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/as-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/basic-in-binary-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/basic.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/block-body-not-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/block-body.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-dup-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-missing-paren.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-not-arrow.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-numeric-param-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-numeric-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-reverse-arrow.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-default-param-eval.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-dup-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-eval-return.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-eval.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-octal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-param-arguments.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-param-eval.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-param-names.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-param-no-paren-arguments.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-strict-param-no-paren-eval.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-two-lines.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/error-wrapped-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/iife.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/multiple-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/no-auto-return.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/not-strict-arguments.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/not-strict-eval-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/not-strict-eval.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/not-strict-octal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/return-arrow-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/return-sequence.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/single-param-parens.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/single-param-return-identifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/arrowFunctions/single-param.src.js (100%) rename tests/fixtures/{ => javascript}/basics/delete-expression.src.js (100%) rename tests/fixtures/{ => javascript}/basics/do-while-statements.src.js (100%) rename tests/fixtures/{ => javascript}/basics/identifiers-double-underscore.src.js (100%) rename tests/fixtures/{ => javascript}/basics/instanceof.src.js (100%) rename tests/fixtures/{ => javascript}/basics/new-with-member-expression.src.js (100%) rename tests/fixtures/{ => javascript}/basics/new-without-parens.src.js (100%) rename tests/fixtures/{ => javascript}/basics/typeof-expression.src.js (100%) rename tests/fixtures/{ => javascript}/basics/update-expression.src.js (100%) rename tests/fixtures/{ => javascript}/basics/void-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/binaryLiterals/invalid.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/binaryLiterals/lowercase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/binaryLiterals/uppercase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/blockBindings/const.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/blockBindings/let-in-switchcase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/blockBindings/let.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-accessor-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-computed-static-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-method-named-prototype.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-method-named-static.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-method-named-with-space.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-one-method-super.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-one-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-static-method-named-prototype.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-static-method-named-static.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-static-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-static-methods-and-accessor-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-computed-static-methods.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-methods-computed-constructor.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-methods-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-methods-three-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-methods-two-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-methods.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-two-static-methods-named-constructor.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-with-constructor-parameters.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-with-constructor-with-space.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/class-with-constructor.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/derived-class-assign-to-var.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/derived-class-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/empty-class-double-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/empty-class-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/empty-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/empty-literal-derived-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/invalid-class-declaration.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/invalid-class-setter-declaration.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/invalid-class-two-super-classes.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/named-class-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/classes/named-derived-class-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/class-constructor.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/class-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/declaration.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/defaultParams/not-all-params.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/arrow-param-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/arrow-param-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/param-defaults-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-arrowFunctions/param-defaults-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/array-const-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/array-let-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/object-const-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/object-const-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/object-let-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-blockBindings/object-let-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-defaultParams/param-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-defaultParams/param-object-short.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-defaultParams/param-object-wrapped.src.xjs (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-defaultParams/param-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-forOf/loop.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/complex-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/destructured-array-literal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/destructuring-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/error-complex-destructured-spread-first.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/invalid-not-final-array-empty.src.xjs (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/multi-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/not-final-array.src.xjs (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/single-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/var-complex-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/var-destructured-array-literal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/var-multi-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring-and-spread/var-single-destructured.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/array-member.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/array-to-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/array-var-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-constructor-params-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-constructor-params-defaults-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-constructor-params-defaults-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-constructor-params-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-method-params-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-method-params-defaults-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-method-params-defaults-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/class-method-params-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array-all.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array-longform-nested-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array-nested-all.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array-nested-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-all.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-longform-all.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-longform-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-longform.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-mixed-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-nested-all.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object-nested-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/defaults-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/destructured-array-catch.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/destructured-object-catch.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/invalid-defaults-object-assign.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/named-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/nested-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/nested-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/object-var-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/object-var-undefined.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/param-defaults-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/param-defaults-object-nested.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/param-defaults-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-array-wrapped.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-multi-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-nested-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-nested-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-object-wrapped.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/params-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/destructuring/sparse-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalAsyncIteration/async-generators.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalAsyncIteration/async-iterator.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalDynamicImport/dynamic-import.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/arg-spread.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/destructuring-assign-mirror.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/function-parameter-object-spread.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/invalid-rest.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/object-rest.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/property-spread.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/shorthand-method-args.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/shorthand-methods.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/shorthand-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/single-spread.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/spread-trailing-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalObjectRestSpread/two-spread.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/experimentalOptionalCatchBinding/optional-catch-binding.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/exponentiationOperators/exponential-operators.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/forOf/for-of-with-function-initializer.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/forOf/for-of-with-var-and-braces.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/forOf/for-of-with-var-and-no-braces.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/forOf/invalid-for-of-with-const-and-no-braces.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/forOf/invalid-for-of-with-let-and-no-braces.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/anonymous-generator.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/async-generator-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/async-generator-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/double-yield.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/empty-generator-declaration.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/generator-declaration.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/yield-delegation.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/yield-without-value-in-call.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/yield-without-value-no-semi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/generators/yield-without-value.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/globalReturn/return-identifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/globalReturn/return-no-arg.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/globalReturn/return-true.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/importMeta/simple-import-meta.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/error-delete.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/error-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/error-strict.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-array.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-named-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-named-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-number.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-object.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-default-value.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-batch.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-named-as-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-named-as-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-named-as-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-from-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-as-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-as-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-as-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-empty.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-specifiers-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-named-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-var-anonymous-function.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-var-number.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/export-var.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-default-and-named-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-default-and-namespace-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-default-as.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-jquery.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-module.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-as-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-as-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-empty.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-specifiers-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-named-specifiers.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-namespace-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/import-null-as-nil.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-await.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-class.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-batch-missing-from-clause.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-batch-token.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-default-equal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-default-token.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-named-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-named-extra-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-export-named-middle-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-default-after-named-after-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-default-after-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-default-missing-module-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-default-module-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-missing-module-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-module-specifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-named-after-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-named-after-namespace.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-named-as-missing-from.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-named-extra-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-named-middle-comma.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-namespace-after-named.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/modules/invalid-import-namespace-missing-as.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/newTarget/invalid-new-target.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/newTarget/invalid-unknown-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/newTarget/simple-new-target.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteral/object-literal-in-lhs.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/computed-addition-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/computed-and-identifier.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/computed-getter-and-setter.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/computed-string-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/computed-variable-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/invalid-computed-variable-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/standalone-expression-with-addition.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/standalone-expression-with-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralComputedProperties/standalone-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralDuplicateProperties/error-proto-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralDuplicateProperties/error-proto-string-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/invalid-method-no-braces.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/method-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/simple-method-named-get.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/simple-method-named-set.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/simple-method-with-argument.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/simple-method-with-string-name.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/simple-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandMethods/string-name-method-property.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/objectLiteralShorthandProperties/shorthand-properties.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/octalLiterals/invalid.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/octalLiterals/lowercase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/octalLiterals/strict-uppercase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/octalLiterals/uppercase.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/regex/regexp-simple.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/regexUFlag/regex-u-extended-escape.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/regexUFlag/regex-u-invalid-extended-escape.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/regexUFlag/regex-u-simple.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/regexYFlag/regexp-y-simple.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/basic-rest.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/class-constructor.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/class-method.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/error-no-default.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/error-not-last.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/func-expression-multi.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/func-expression.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/invalid-rest-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/restParams/single-rest.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/spread/error-invalid-if.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/spread/error-invalid-sequence.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/spread/multi-function-call.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/spread/not-final-param.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/spread/simple-function-call.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/deeply-nested.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/error-octal-literal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/escape-characters.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/expressions.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/multi-line-template-string.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/simple-template-string.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/single-dollar-sign.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/tagged-no-placeholders.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/templateStrings/tagged-template-string.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/unicodeCodePointEscapes/basic-string-literal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/unicodeCodePointEscapes/complex-string-literal.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/unicodeCodePointEscapes/invalid-empty-escape.src.js (100%) rename tests/fixtures/{ecma-features => javascript}/unicodeCodePointEscapes/invalid-too-large-escape.src.js (100%) create mode 100644 tests/fixtures/semanticInfo/badTSConfig/app.ts create mode 100644 tests/fixtures/semanticInfo/badTSConfig/tsconfig.json create mode 100644 tests/fixtures/semanticInfo/export-file.src.ts create mode 100644 tests/fixtures/semanticInfo/import-file.src.ts create mode 100644 tests/fixtures/semanticInfo/isolated-file.src.ts create mode 100644 tests/fixtures/semanticInfo/tsconfig.json delete mode 100644 tests/lib/__snapshots__/basics.ts.snap rename tests/lib/__snapshots__/{ecma-features.ts.snap => javascript.ts.snap} (96%) create mode 100644 tests/lib/__snapshots__/semanticInfo.ts.snap delete mode 100644 tests/lib/basics.ts rename tests/lib/{ecma-features.ts => javascript.ts} (93%) create mode 100644 tests/lib/semanticInfo.ts diff --git a/package.json b/package.json index 93f53d6..a1ba511 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@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", "babel-code-frame": "6.26.0", diff --git a/src/ast-converter.ts b/src/ast-converter.ts index f46ca74..04df089 100644 --- a/src/ast-converter.ts +++ b/src/ast-converter.ts @@ -5,9 +5,10 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import { convert } from './convert'; +import convert, { getASTMaps, resetASTMaps } from './convert'; import { convertComments } from './convert-comments'; import nodeUtils from './node-utils'; +import ts from 'typescript'; import { Extra } from './temp-types-based-on-js-source'; /** @@ -23,13 +24,17 @@ function convertError(error: any) { ); } -export default (ast: any, extra: Extra) => { +export default ( + ast: ts.SourceFile, + extra: Extra, + shouldProvideParserServices: boolean +) => { /** * The TypeScript compiler produced fundamental parse errors when parsing the * source. */ - if (ast.parseDiagnostics.length) { - throw convertError(ast.parseDiagnostics[0]); + if ((ast as any).parseDiagnostics.length) { + throw convertError((ast as any).parseDiagnostics[0]); } /** @@ -41,7 +46,8 @@ export default (ast: any, extra: Extra) => { ast, additionalOptions: { errorOnUnknownASTType: extra.errorOnUnknownASTType || false, - useJSXTextNode: extra.useJSXTextNode || false + useJSXTextNode: extra.useJSXTextNode || false, + shouldProvideParserServices } }); @@ -59,5 +65,11 @@ export default (ast: any, extra: Extra) => { estree.comments = convertComments(ast, extra.code); } - return estree; + let astMaps = undefined; + if (shouldProvideParserServices) { + astMaps = getASTMaps(); + resetASTMaps(); + } + + return { estree, astMaps }; }; diff --git a/src/convert.ts b/src/convert.ts index 13ead9d..ce612fd 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -12,6 +12,31 @@ import { ESTreeNode } from './temp-types-based-on-js-source'; const SyntaxKind = ts.SyntaxKind; +let esTreeNodeToTSNodeMap = new WeakMap(); +let tsNodeToESTreeNodeMap = new WeakMap(); + +export function resetASTMaps() { + esTreeNodeToTSNodeMap = new WeakMap(); + tsNodeToESTreeNodeMap = new WeakMap(); +} + +export function getASTMaps() { + return { esTreeNodeToTSNodeMap, tsNodeToESTreeNodeMap }; +} + +interface ConvertAdditionalOptions { + errorOnUnknownASTType: boolean; + useJSXTextNode: boolean; + shouldProvideParserServices: boolean; +} + +interface ConvertConfig { + node: ts.Node; + parent?: ts.Node | null; + ast: ts.SourceFile; + additionalOptions: ConvertAdditionalOptions; +} + /** * Converts a TypeScript node into an ESTree node * @param {Object} config configuration options for the conversion @@ -21,7 +46,7 @@ const SyntaxKind = ts.SyntaxKind; * @param {Object} config.additionalOptions additional options for the conversion * @returns {ESTreeNode|null} the converted ESTreeNode */ -export function convert(config: any): ESTreeNode | null { +export default function convert(config: ConvertConfig): ESTreeNode | null { const node = config.node as ts.Node; const parent = config.parent; const ast = config.ast; @@ -39,7 +64,7 @@ export function convert(config: any): ESTreeNode | null { */ let result: Partial = { type: '', - range: [node.getStart(), node.end], + range: [node.getStart(ast), node.end], loc: nodeUtils.getLoc(node, ast) }; @@ -108,8 +133,12 @@ export function convert(config: any): ESTreeNode | null { typeArgumentsParent.kind === SyntaxKind.TypeReference) ) { const lastTypeArgument = typeArguments[typeArguments.length - 1]; - const greaterThanToken = nodeUtils.findNextToken(lastTypeArgument, ast); - end = greaterThanToken.end; + const greaterThanToken = nodeUtils.findNextToken( + lastTypeArgument, + ast, + ast + ); + end = greaterThanToken!.end; } } return { @@ -120,7 +149,7 @@ export function convert(config: any): ESTreeNode | null { if (nodeUtils.isTypeKeyword(typeArgument.kind)) { return { type: AST_NODE_TYPES[`TS${SyntaxKind[typeArgument.kind]}`], - range: [typeArgument.getStart(), typeArgument.getEnd()], + range: [typeArgument.getStart(ast), typeArgument.getEnd()], loc: nodeUtils.getLoc(typeArgument, ast) }; } @@ -134,7 +163,7 @@ export function convert(config: any): ESTreeNode | null { } return { type: AST_NODE_TYPES.TSTypeReference, - range: [typeArgument.getStart(), typeArgument.getEnd()], + range: [typeArgument.getStart(ast), typeArgument.getEnd()], loc: nodeUtils.getLoc(typeArgument, ast), typeName: convertChild(typeArgument.typeName || typeArgument), typeParameters: typeArgument.typeArguments @@ -156,14 +185,18 @@ export function convert(config: any): ESTreeNode | null { const firstTypeParameter = typeParameters[0]; const lastTypeParameter = typeParameters[typeParameters.length - 1]; - const greaterThanToken = nodeUtils.findNextToken(lastTypeParameter, ast); + const greaterThanToken = nodeUtils.findNextToken( + lastTypeParameter, + ast, + ast + ); return { type: AST_NODE_TYPES.TSTypeParameterDeclaration, - range: [firstTypeParameter.pos - 1, greaterThanToken.end], + range: [firstTypeParameter.pos - 1, greaterThanToken!.end], loc: nodeUtils.getLocFor( firstTypeParameter.pos - 1, - greaterThanToken.end, + greaterThanToken!.end, ast ), params: typeParameters.map(typeParameter => { @@ -189,7 +222,7 @@ export function convert(config: any): ESTreeNode | null { return { type: AST_NODE_TYPES.TSTypeParameter, - range: [typeParameter.getStart(), typeParameter.getEnd()], + range: [typeParameter.getStart(ast), typeParameter.getEnd()], loc: nodeUtils.getLoc(typeParameter, ast), name, constraint, @@ -258,7 +291,7 @@ export function convert(config: any): ESTreeNode | null { const expression = convertChild(decorator.expression); return { type: AST_NODE_TYPES.Decorator, - range: [decorator.getStart(), decorator.end], + range: [decorator.getStart(ast), decorator.end], loc: nodeUtils.getLoc(decorator, ast), expression }; @@ -336,8 +369,10 @@ export function convert(config: any): ESTreeNode | null { (result as any)[key] = (node as any)[key].map(convertChild); } else if ( (node as any)[key] && - typeof (node as any)[key] === 'object' + typeof (node as any)[key] === 'object' && + (node as any)[key].kind ) { + // need to check node[key].kind to ensure we don't try to convert a symbol (result as any)[key] = convertChild((node as any)[key]); } else { (result as any)[key] = (node as any)[key]; @@ -475,7 +510,7 @@ export function convert(config: any): ESTreeNode | null { (result as any).range[1] = (node as any).endOfFileToken.end; result.loc = nodeUtils.getLocFor( - node.getStart(), + node.getStart(ast), (result as any).range[1], ast ); @@ -873,7 +908,7 @@ export function convert(config: any): ESTreeNode | null { } case SyntaxKind.ComputedPropertyName: - if (parent.kind === SyntaxKind.ObjectLiteralExpression) { + if (parent!.kind === SyntaxKind.ObjectLiteralExpression) { Object.assign(result, { type: AST_NODE_TYPES.Property, key: convertChild((node as any).name), @@ -949,11 +984,12 @@ export function convert(config: any): ESTreeNode | null { return false; } return nodeUtils.getTextForTokenKind(token.kind) === '('; - } + }, + ast ); const methodLoc = ast.getLineAndCharacterOfPosition( - (openingParen as any).getStart() + (openingParen as any).getStart(ast) ), nodeIsMethod = node.kind === SyntaxKind.MethodDeclaration, method = { @@ -977,7 +1013,7 @@ export function convert(config: any): ESTreeNode | null { (method as any).returnType = convertTypeAnnotation((node as any).type); } - if (parent.kind === SyntaxKind.ObjectLiteralExpression) { + if (parent!.kind === SyntaxKind.ObjectLiteralExpression) { (method as any).params = (node as any).parameters.map(convertChild); Object.assign(result, { @@ -1063,7 +1099,7 @@ export function convert(config: any): ESTreeNode | null { node ), firstConstructorToken = constructorIsStatic - ? nodeUtils.findNextToken((node as any).getFirstToken(), ast) + ? nodeUtils.findNextToken((node as any).getFirstToken(), ast, ast) : node.getFirstToken(), constructorLoc = ast.getLineAndCharacterOfPosition( (node as any).parameters.pos - 1 @@ -1087,10 +1123,10 @@ export function convert(config: any): ESTreeNode | null { }; const constructorIdentifierLocStart = ast.getLineAndCharacterOfPosition( - (firstConstructorToken as any).getStart() + (firstConstructorToken as any).getStart(ast) ), constructorIdentifierLocEnd = ast.getLineAndCharacterOfPosition( - (firstConstructorToken as any).getEnd() + (firstConstructorToken as any).getEnd(ast) ), constructorIsComputed = !!(node as any).name && @@ -1104,7 +1140,7 @@ export function convert(config: any): ESTreeNode | null { value: 'constructor', raw: (node as any).name.getText(), range: [ - (firstConstructorToken as any).getStart(), + (firstConstructorToken as any).getStart(ast), (firstConstructorToken as any).end ], loc: { @@ -1123,7 +1159,7 @@ export function convert(config: any): ESTreeNode | null { type: AST_NODE_TYPES.Identifier, name: 'constructor', range: [ - (firstConstructorToken as any).getStart(), + (firstConstructorToken as any).getStart(ast), (firstConstructorToken as any).end ], loc: { @@ -1210,7 +1246,7 @@ export function convert(config: any): ESTreeNode | null { break; case SyntaxKind.BindingElement: - if (parent.kind === SyntaxKind.ArrayBindingPattern) { + if (parent!.kind === SyntaxKind.ArrayBindingPattern) { const arrayItem = convert({ node: (node as any).name, parent, @@ -1232,7 +1268,7 @@ export function convert(config: any): ESTreeNode | null { } else { return arrayItem; } - } else if (parent.kind === SyntaxKind.ObjectBindingPattern) { + } else if (parent!.kind === SyntaxKind.ObjectBindingPattern) { if ((node as any).dotDotDotToken) { Object.assign(result, { type: AST_NODE_TYPES.RestElement, @@ -1262,11 +1298,11 @@ export function convert(config: any): ESTreeNode | null { left: convertChild((node as any).name), right: convertChild((node as any).initializer), range: [ - (node as any).name.getStart(), + (node as any).name.getStart(ast), (node as any).initializer.end ], loc: nodeUtils.getLocFor( - (node as any).name.getStart(), + (node as any).name.getStart(ast), (node as any).initializer.end, ast ) @@ -1323,7 +1359,7 @@ export function convert(config: any): ESTreeNode | null { { type: AST_NODE_TYPES.TemplateElement, value: { - raw: ast.text.slice(node.getStart() + 1, node.end - 1), + raw: ast.text.slice(node.getStart(ast) + 1, node.end - 1), cooked: (node as any).text }, tail: true, @@ -1366,7 +1402,10 @@ export function convert(config: any): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.TemplateElement, value: { - raw: ast.text.slice(node.getStart() + 1, node.end - (tail ? 1 : 2)), + raw: ast.text.slice( + node.getStart(ast) + 1, + node.end - (tail ? 1 : 2) + ), cooked: (node as any).text }, tail @@ -1459,7 +1498,7 @@ export function convert(config: any): ESTreeNode | null { if (node.modifiers) { return { type: AST_NODE_TYPES.TSParameterProperty, - range: [node.getStart(), node.end], + range: [node.getStart(ast), node.end], loc: nodeUtils.getLoc(node, ast), accessibility: nodeUtils.getTSNodeAccessibility(node) || undefined, readonly: @@ -1493,7 +1532,7 @@ export function convert(config: any): ESTreeNode | null { ]; if (!lastClassToken || lastTypeParameter.pos > lastClassToken.pos) { - lastClassToken = nodeUtils.findNextToken(lastTypeParameter, ast); + lastClassToken = nodeUtils.findNextToken(lastTypeParameter, ast, ast); } result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( (node as any).typeParameters @@ -1517,14 +1556,14 @@ export function convert(config: any): ESTreeNode | null { const lastModifier = node.modifiers[node.modifiers.length - 1]; if (!lastClassToken || lastModifier.pos > lastClassToken.pos) { - lastClassToken = nodeUtils.findNextToken(lastModifier, ast); + lastClassToken = nodeUtils.findNextToken(lastModifier, ast, ast); } } else if (!lastClassToken) { // no name lastClassToken = node.getFirstToken(); } - const openBrace = nodeUtils.findNextToken(lastClassToken, ast); + const openBrace = nodeUtils.findNextToken(lastClassToken, ast, ast)!; const superClass = heritageClauses.find( (clause: any) => clause.token === SyntaxKind.ExtendsKeyword ); @@ -1557,8 +1596,8 @@ export function convert(config: any): ESTreeNode | null { body: [], // TODO: Fix location info - range: [openBrace.getStart(), (result as any).range[1]], - loc: nodeUtils.getLocFor(openBrace.getStart(), node.end, ast) + range: [openBrace.getStart(ast), (result as any).range[1]], + loc: nodeUtils.getLocFor(openBrace.getStart(ast), node.end, ast) }, superClass: superClass && superClass.types[0] @@ -1849,7 +1888,7 @@ export function convert(config: any): ESTreeNode | null { break; case SyntaxKind.PropertyAccessExpression: - if (nodeUtils.isJSXToken(parent)) { + if (nodeUtils.isJSXToken(parent!)) { const jsxMemberExpression = { type: AST_NODE_TYPES.MemberExpression, object: convertChild((node as any).expression), @@ -1948,7 +1987,7 @@ export function convert(config: any): ESTreeNode | null { type: AST_NODE_TYPES.Literal, raw: ast.text.slice((result as any).range[0], (result as any).range[1]) }); - if (parent.name && parent.name === node) { + if ((parent as any).name && (parent as any).name === node) { (result as any).value = (node as any).text; } else { (result as any).value = nodeUtils.unescapeStringLiteralText( @@ -2216,7 +2255,7 @@ export function convert(config: any): ESTreeNode | null { type: AST_NODE_TYPES.VariableDeclarator, id: convertChild((node as any).name), init: convertChild((node as any).type), - range: [(node as any).name.getStart(), (node as any).end] + range: [(node as any).name.getStart(ast), (node as any).end] }; (typeAliasDeclarator as any).loc = nodeUtils.getLocFor( @@ -2359,6 +2398,7 @@ export function convert(config: any): ESTreeNode | null { ) { interfaceLastClassToken = nodeUtils.findNextToken( interfaceLastTypeParameter, + ast, ast ); } @@ -2374,14 +2414,19 @@ export function convert(config: any): ESTreeNode | null { ); const interfaceOpenBrace = nodeUtils.findNextToken( interfaceLastClassToken, + ast, ast - ); + )!; const interfaceBody = { type: AST_NODE_TYPES.TSInterfaceBody, body: (node as any).members.map((member: any) => convertChild(member)), - range: [interfaceOpenBrace.getStart(), (result as any).range[1]], - loc: nodeUtils.getLocFor(interfaceOpenBrace.getStart(), node.end, ast) + range: [interfaceOpenBrace.getStart(ast), (result as any).range[1]], + loc: nodeUtils.getLocFor( + interfaceOpenBrace.getStart(ast), + node.end, + ast + ) }; Object.assign(result, { @@ -2492,5 +2537,10 @@ export function convert(config: any): ESTreeNode | null { deeplyCopy(); } + if (additionalOptions.shouldProvideParserServices) { + tsNodeToESTreeNodeMap.set(node, result); + esTreeNodeToTSNodeMap.set(result, node); + } + return result as any; } diff --git a/src/node-utils.ts b/src/node-utils.ts index 89618cd..873db9c 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -160,7 +160,8 @@ export default { isTypeKeyword, isComment, isJSDocComment, - createError + createError, + firstDefined }; /** @@ -296,7 +297,7 @@ function getLoc( nodeOrToken: ts.Node | ts.Token, ast: ts.SourceFile ): ESTreeNodeLoc { - return getLocFor(nodeOrToken.getStart(), nodeOrToken.end, ast); + return getLocFor(nodeOrToken.getStart(ast), nodeOrToken.end, ast); } /** @@ -406,18 +407,35 @@ function hasStaticModifierFlag(node: ts.Node): boolean { /** * Finds the next token based on the previous one and its parent - * @param {ts.Token} previousToken The previous ts.Token - * @param {ts.Node} parent The parent ts.Node + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + * @param {ts.Token} previousToken The previous TSToken + * @param {ts.Node} parent The parent TSNode + * @param {ts.SourceFile} ast The TS AST * @returns {ts.Token} the next TSToken */ function findNextToken( previousToken: ts.Token, - parent: ts.Node -): ts.Token { - /** - * TODO: Remove dependency on private TypeScript method - */ - return (ts as any).findNextToken(previousToken, parent); + parent: ts.Node, + ast: ts.SourceFile +): ts.Token | undefined { + return find(parent); + + function find(n: ts.Node): ts.Token | undefined { + if (ts.isToken(n) && n.pos === previousToken.end) { + // this is token that starts at the end of previous token - return it + return n; + } + return firstDefined(n.getChildren(ast), (child: ts.Node) => { + const shouldDiveInChildNode = + // previous token is enclosed somewhere in the child + (child.pos <= previousToken.pos && child.end > previousToken.end) || + // previous token ends exactly at the beginning of child + child.pos === previousToken.end; + return shouldDiveInChildNode && nodeHasTokens(child, ast) + ? find(child) + : undefined; + }); + } } /** @@ -425,18 +443,20 @@ function findNextToken( * @param {ts.Token} previousToken The previous ts.Token * @param {ts.Node} parent The parent ts.Node * @param {Function} predicate The predicate function to apply to each checked token + * @param {ts.SourceFile} ast The TS AST * @returns {ts.Token|undefined} a matching ts.Token */ function findFirstMatchingToken( - previousToken: ts.Token, + previousToken: ts.Token | undefined, parent: ts.Node, - predicate: (node: ts.Node) => boolean + predicate: (node: ts.Node) => boolean, + ast: ts.SourceFile ): ts.Token | undefined { while (previousToken) { if (predicate(previousToken)) { return previousToken; } - previousToken = findNextToken(previousToken, parent); + previousToken = findNextToken(previousToken, parent, ast); } return undefined; } @@ -555,9 +575,9 @@ function fixExports( lastModifier = node.modifiers[node.modifiers.length - 1], declarationIsDefault = nextModifier && nextModifier.kind === SyntaxKind.DefaultKeyword, - varToken = findNextToken(lastModifier, ast); + varToken = findNextToken(lastModifier, ast, ast); - result.range[0] = varToken.getStart(); + result.range[0] = varToken!.getStart(ast); result.loc = getLocFor(result.range[0], result.range[1], ast); const declarationType = declarationIsDefault @@ -567,8 +587,8 @@ function fixExports( const newResult: any = { type: declarationType, declaration: result, - range: [exportKeyword.getStart(), result.range[1]], - loc: getLocFor(exportKeyword.getStart(), result.range[1], ast) + range: [exportKeyword.getStart(ast), result.range[1]], + loc: getLocFor(exportKeyword.getStart(ast), result.range[1], ast) }; if (!declarationIsDefault) { @@ -699,7 +719,7 @@ function convertToken(token: ts.Token, ast: ts.SourceFile): ESTreeToken { const start = token.kind === SyntaxKind.JsxText ? token.getFullStart() - : token.getStart(), + : token.getStart(ast), end = token.getEnd(), value = ast.text.slice(start, end), newToken: any = { @@ -744,7 +764,7 @@ function convertTokens(ast: ts.SourceFile): ESTreeToken[] { result.push(converted); } } else { - node.getChildren().forEach(walk); + node.getChildren(ast).forEach(walk); } } walk(ast); @@ -802,3 +822,40 @@ function createError(ast: ts.SourceFile, start: number, message: string) { message }; } + +/** + * @param {ts.Node} n the TSNode + * @param {ts.SourceFile} ast the TS AST + */ +function nodeHasTokens(n: ts.Node, ast: ts.SourceFile) { + // If we have a token or node that has a non-zero width, it must have tokens. + // Note: getWidth() does not take trivia into account. + return n.kind === SyntaxKind.EndOfFileToken + ? !!(n as any).jsDoc + : n.getWidth(ast) !== 0; +} + +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + * @template T + * @template U + * @param {ReadonlyArray|undefined} array + * @param {(element: T, index: number) => (U|undefined)} callback + * @returns {U|undefined} + */ +function firstDefined( + array: ReadonlyArray | undefined, + callback: (element: T, index: number) => U | undefined +): U | undefined { + if (array === undefined) { + return undefined; + } + + for (let i = 0; i < array.length; i++) { + const result = callback(array[i], i); + if (result !== undefined) { + return result; + } + } + return undefined; +} diff --git a/src/parser.ts b/src/parser.ts index 29de065..e2349da 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -5,6 +5,7 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ +import calculateProjectParserOptions from './tsconfig-parser'; import semver from 'semver'; import ts from 'typescript'; import convert from './ast-converter'; @@ -15,6 +16,7 @@ import { ESTreeComment } from './temp-types-based-on-js-source'; import { Program } from './estree/spec'; +import util from './node-utils'; const packageJSON = require('../package.json'); @@ -43,16 +45,115 @@ function resetExtra(): void { jsx: false, useJSXTextNode: false, log: console.log, + projects: [], errorOnUnknownASTType: false, - code: '' + code: '', + tsconfigRootDir: process.cwd() }; } +/** + * @param {string} code The code of the file being linted + * @param {Object} options The config object + * @returns {{ast: ts.SourceFile, program: ts.Program} | undefined} If found, returns the source file corresponding to the code and the containing program + */ +function getASTFromProject(code: string, options: ParserOptions) { + return util.firstDefined( + calculateProjectParserOptions( + code, + options.filePath || (options.jsx ? 'estree.ts' : 'estree.tsx'), + extra + ), + (currentProgram: ts.Program) => { + const ast = currentProgram.getSourceFile( + options.filePath || (options.jsx ? 'estree.ts' : 'estree.tsx') + ); + return ast && { ast, program: currentProgram }; + } + ); +} + +/** + * @param {string} code The code of the file being linted + * @returns {{ast: ts.SourceFile, program: ts.Program}} Returns a new source file and program corresponding to the linted code + */ +function createNewProgram(code: string) { + // Even if jsx option is set in typescript compiler, filename still has to + // contain .tsx file extension + const FILENAME = extra.jsx ? 'estree.tsx' : 'estree.ts'; + + const compilerHost = { + fileExists() { + return true; + }, + getCanonicalFileName() { + return FILENAME; + }, + getCurrentDirectory() { + return ''; + }, + getDirectories() { + return []; + }, + getDefaultLibFileName() { + return 'lib.d.ts'; + }, + + // TODO: Support Windows CRLF + getNewLine() { + return '\n'; + }, + getSourceFile(filename: string) { + return ts.createSourceFile(filename, code, ts.ScriptTarget.Latest, true); + }, + readFile() { + return undefined; + }, + useCaseSensitiveFileNames() { + return true; + }, + writeFile() { + return null; + } + }; + + const program = ts.createProgram( + [FILENAME], + { + noResolve: true, + target: ts.ScriptTarget.Latest, + jsx: extra.jsx ? ts.JsxEmit.Preserve : undefined + }, + compilerHost + ); + + const ast = program.getSourceFile(FILENAME)!; + + return { ast, program }; +} + +/** + * @param {string} code The code of the file being linted + * @param {Object} options The config object + * @param {boolean} shouldProvideParserServices True iff the program should be attempted to be calculated from provided tsconfig files + * @returns {{ast: ts.SourceFile, program: ts.Program}} Returns a source file and program corresponding to the linted code + */ +function getProgramAndAST( + code: string, + options: ParserOptions, + shouldProvideParserServices: boolean +) { + return ( + (shouldProvideParserServices && getASTFromProject(code, options)) || + createNewProgram(code) + ); +} + //------------------------------------------------------------------------------ // Parser //------------------------------------------------------------------------------ -type ParserResult = Program & +type AST = Program & (T['range'] extends true ? { range: [number, number] } : {}) & (T['tokens'] extends true ? { tokens: ESTreeToken[] } : {}) & (T['comment'] extends true ? { comments: ESTreeComment[] } : {}); @@ -60,13 +161,29 @@ type ParserResult = Program & /** * Parses the given source code to produce a valid AST * @param {string} code TypeScript code + * @param {boolean} shouldGenerateServices Flag determining whether to generate ast maps and program or not * @param {ParserOptions} options configuration object for the parser * @returns {Object} the AST */ function generateAST( code: string, - options?: T -): ParserResult { + options: T = {} as T, + shouldGenerateServices = false +): { + estree: AST; + program: typeof shouldGenerateServices extends true + ? ts.Program + : (ts.Program | undefined); + astMaps: typeof shouldGenerateServices extends true + ? { + esTreeNodeToTSNodeMap: WeakMap; + tsNodeToESTreeNodeMap: WeakMap; + } + : { + esTreeNodeToTSNodeMap?: WeakMap; + tsNodeToESTreeNodeMap?: WeakMap; + }; +} { const toString = String; if (typeof code !== 'string' && !((code as any) instanceof String)) { @@ -115,6 +232,19 @@ function generateAST( } else if (options.loggerFn === false) { extra.log = Function.prototype; } + + if (typeof options.project === 'string') { + extra.projects = [options.project]; + } else if ( + Array.isArray(options.project) && + options.project.every(projectPath => typeof projectPath === 'string') + ) { + extra.projects = options.project; + } + + if (typeof options.tsconfigRootDir === 'string') { + extra.tsconfigRootDir = options.tsconfigRootDir; + } } if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { @@ -132,59 +262,23 @@ function generateAST( warnedAboutTSVersion = true; } - // Even if jsx option is set in typescript compiler, filename still has to - // contain .tsx file extension - const FILENAME = extra.jsx ? 'estree.tsx' : 'estree.ts'; - - const compilerHost = { - fileExists() { - return true; - }, - getCanonicalFileName() { - return FILENAME; - }, - getCurrentDirectory() { - return ''; - }, - getDefaultLibFileName() { - return 'lib.d.ts'; - }, - - // TODO: Support Windows CRLF - getNewLine() { - return '\n'; - }, - getSourceFile(filename: string) { - return ts.createSourceFile(filename, code, ts.ScriptTarget.Latest, true); - }, - readFile() { - return undefined; - }, - useCaseSensitiveFileNames() { - return true; - }, - writeFile() { - return null; - }, - getDirectories() { - return []; - } - }; - - const program = ts.createProgram( - [FILENAME], - { - noResolve: true, - target: ts.ScriptTarget.Latest, - jsx: extra.jsx ? ts.JsxEmit.Preserve : undefined - }, - compilerHost + const shouldProvideParserServices = + shouldGenerateServices && extra.projects && extra.projects.length > 0; + const { ast, program } = getProgramAndAST( + code, + options, + shouldProvideParserServices ); - const ast = program.getSourceFile(FILENAME); - extra.code = code; - return convert(ast, extra); + const { estree, astMaps } = convert(ast, extra, shouldProvideParserServices); + return { + estree, + program: shouldProvideParserServices ? program : undefined, + astMaps: shouldProvideParserServices + ? astMaps! + : { esTreeNodeToTSNodeMap: undefined, tsNodeToESTreeNodeMap: undefined } + }; } //------------------------------------------------------------------------------ @@ -200,5 +294,17 @@ export function parse( code: string, options?: T ) { - return generateAST(code, options); + return generateAST(code, options).estree; +} + +export function parseAndGenerateServices(code: string, options: ParserOptions) { + const result = generateAST(code, options, /*shouldGenerateServices*/ true); + return { + ast: result.estree, + services: { + program: result.program, + esTreeNodeToTSNodeMap: result.astMaps.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: result.astMaps.tsNodeToESTreeNodeMap + } + }; } diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index 1cba4a1..b5db5cb 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -66,6 +66,8 @@ export interface Extra { strict: boolean; jsx: boolean; log: Function; + projects: string[]; + tsconfigRootDir: string; } export interface ParserOptions { @@ -77,4 +79,7 @@ export interface ParserOptions { errorOnUnknownASTType?: boolean; useJSXTextNode?: boolean; loggerFn?: Function | false; + project?: string | string[]; + filePath?: string; + tsconfigRootDir?: string; } diff --git a/src/tsconfig-parser.ts b/src/tsconfig-parser.ts new file mode 100644 index 0000000..63d472f --- /dev/null +++ b/src/tsconfig-parser.ts @@ -0,0 +1,149 @@ +'use strict'; + +import path from 'path'; +import ts from 'typescript'; +import { Extra } from './temp-types-based-on-js-source'; + +//------------------------------------------------------------------------------ +// Environment calculation +//------------------------------------------------------------------------------ + +/** + * Maps tsconfig paths to their corresponding file contents and resulting watches + * @type {Map>} + */ +const knownWatchProgramMap = new Map< + string, + ts.WatchOfConfigFile +>(); + +/** + * Maps file paths to their set of corresponding watch callbacks + * There may be more than one per file if a file is shared between projects + * @type {Map} + */ +const watchCallbackTrackingMap = new Map(); + +/** + * Holds information about the file currently being linted + * @type {{code: string, filePath: string}} + */ +const currentLintOperationState = { + code: '', + filePath: '' +}; + +/** + * Appropriately report issues found when reading a config file + * @param {ts.Diagnostic} diagnostic The diagnostic raised when creating a program + * @returns {void} + */ +function diagnosticReporter(diagnostic: ts.Diagnostic): void { + throw new Error( + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + ); +} + +const noopFileWatcher = { close: () => {} }; + +/** + * Calculate project environments using options provided by consumer and paths from config + * @param {string} code The code being linted + * @param {string} filePath The path of the file being parsed + * @param {string} extra.tsconfigRootDir The root directory for relative tsconfig paths + * @param {string[]} extra.project Provided tsconfig paths + * @returns {ts.Program[]} The programs corresponding to the supplied tsconfig paths + */ +export default function calculateProjectParserOptions( + code: string, + filePath: string, + extra: Extra +): ts.Program[] { + const results = []; + const tsconfigRootDir = extra.tsconfigRootDir; + + // preserve reference to code and file being linted + currentLintOperationState.code = code; + currentLintOperationState.filePath = filePath; + + // Update file version if necessary + // TODO: only update when necessary, currently marks as changed on every lint + const watchCallback = watchCallbackTrackingMap.get(filePath); + if (typeof watchCallback !== 'undefined') { + watchCallback(filePath, ts.FileWatcherEventKind.Changed); + } + + for (let tsconfigPath of extra.projects) { + // if absolute paths aren't provided, make relative to tsconfigRootDir + if (!path.isAbsolute(tsconfigPath)) { + tsconfigPath = path.join(tsconfigRootDir, tsconfigPath); + } + + const existingWatch = knownWatchProgramMap.get(tsconfigPath); + + if (typeof existingWatch !== 'undefined') { + // get new program (updated if necessary) + results.push(existingWatch.getProgram().getProgram()); + continue; + } + + // create compiler host + const watchCompilerHost = ts.createWatchCompilerHost( + tsconfigPath, + /*optionsToExtend*/ undefined, + ts.sys, + ts.createSemanticDiagnosticsBuilderProgram, + diagnosticReporter, + /*reportWatchStatus*/ () => {} + ); + + // ensure readFile reads the code being linted instead of the copy on disk + const oldReadFile = watchCompilerHost.readFile; + watchCompilerHost.readFile = (filePath, encoding) => + path.normalize(filePath) === + path.normalize(currentLintOperationState.filePath) + ? currentLintOperationState.code + : oldReadFile(filePath, encoding); + + // ensure process reports error on failure instead of exiting process immediately + watchCompilerHost.onUnRecoverableConfigFileDiagnostic = diagnosticReporter; + + // ensure process doesn't emit programs + watchCompilerHost.afterProgramCreate = program => { + // report error if there are any errors in the config file + const configFileDiagnostics = program + .getConfigFileParsingDiagnostics() + .filter( + diag => + diag.category === ts.DiagnosticCategory.Error && diag.code !== 18003 + ); + if (configFileDiagnostics.length > 0) { + diagnosticReporter(configFileDiagnostics[0]); + } + }; + + // register callbacks to trigger program updates without using fileWatchers + watchCompilerHost.watchFile = (fileName, callback) => { + const normalizedFileName = path.normalize(fileName); + watchCallbackTrackingMap.set(normalizedFileName, callback); + return { + close: () => { + watchCallbackTrackingMap.delete(normalizedFileName); + } + }; + }; + + // ensure fileWatchers aren't created for directories + watchCompilerHost.watchDirectory = () => noopFileWatcher; + + // create program + const programWatch = ts.createWatchProgram(watchCompilerHost); + const program = programWatch.getProgram().getProgram(); + + // cache watch program and return current program + knownWatchProgramMap.set(tsconfigPath, programWatch); + results.push(program); + } + + return results; +} diff --git a/tests/fixtures/ecma-features/arrayLiteral/array-literal-in-lhs.src.js b/tests/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrayLiteral/array-literal-in-lhs.src.js rename to tests/fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js diff --git a/tests/fixtures/ecma-features/arrayLiteral/array-literals-in-binary-expr.src.js b/tests/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrayLiteral/array-literals-in-binary-expr.src.js rename to tests/fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/as-param-with-params.src.js b/tests/fixtures/javascript/arrowFunctions/as-param-with-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/as-param-with-params.src.js rename to tests/fixtures/javascript/arrowFunctions/as-param-with-params.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/as-param.src.js b/tests/fixtures/javascript/arrowFunctions/as-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/as-param.src.js rename to tests/fixtures/javascript/arrowFunctions/as-param.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/basic-in-binary-expression.src.js b/tests/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/basic-in-binary-expression.src.js rename to tests/fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/basic.src.js b/tests/fixtures/javascript/arrowFunctions/basic.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/basic.src.js rename to tests/fixtures/javascript/arrowFunctions/basic.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/block-body-not-object.src.js b/tests/fixtures/javascript/arrowFunctions/block-body-not-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/block-body-not-object.src.js rename to tests/fixtures/javascript/arrowFunctions/block-body-not-object.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/block-body.src.js b/tests/fixtures/javascript/arrowFunctions/block-body.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/block-body.src.js rename to tests/fixtures/javascript/arrowFunctions/block-body.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-dup-params.src.js b/tests/fixtures/javascript/arrowFunctions/error-dup-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-dup-params.src.js rename to tests/fixtures/javascript/arrowFunctions/error-dup-params.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-missing-paren.src.js b/tests/fixtures/javascript/arrowFunctions/error-missing-paren.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-missing-paren.src.js rename to tests/fixtures/javascript/arrowFunctions/error-missing-paren.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-not-arrow.src.js b/tests/fixtures/javascript/arrowFunctions/error-not-arrow.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-not-arrow.src.js rename to tests/fixtures/javascript/arrowFunctions/error-not-arrow.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param-multi.src.js b/tests/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-numeric-param-multi.src.js rename to tests/fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-numeric-param.src.js b/tests/fixtures/javascript/arrowFunctions/error-numeric-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-numeric-param.src.js rename to tests/fixtures/javascript/arrowFunctions/error-numeric-param.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-reverse-arrow.src.js b/tests/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-reverse-arrow.src.js rename to tests/fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-default-param-eval.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-default-param-eval.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-dup-params.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-dup-params.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval-return.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-eval-return.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-eval.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-eval.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-eval.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-eval.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-octal.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-octal.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-octal.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-octal.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-arguments.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-param-arguments.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-eval.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-param-eval.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-names.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-param-names.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-param-names.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-arguments.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-arguments.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-eval.src.js b/tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-strict-param-no-paren-eval.src.js rename to tests/fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-two-lines.src.js b/tests/fixtures/javascript/arrowFunctions/error-two-lines.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-two-lines.src.js rename to tests/fixtures/javascript/arrowFunctions/error-two-lines.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/error-wrapped-param.src.js b/tests/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/error-wrapped-param.src.js rename to tests/fixtures/javascript/arrowFunctions/error-wrapped-param.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/expression.src.js b/tests/fixtures/javascript/arrowFunctions/expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/expression.src.js rename to tests/fixtures/javascript/arrowFunctions/expression.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/iife.src.js b/tests/fixtures/javascript/arrowFunctions/iife.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/iife.src.js rename to tests/fixtures/javascript/arrowFunctions/iife.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/multiple-params.src.js b/tests/fixtures/javascript/arrowFunctions/multiple-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/multiple-params.src.js rename to tests/fixtures/javascript/arrowFunctions/multiple-params.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/no-auto-return.src.js b/tests/fixtures/javascript/arrowFunctions/no-auto-return.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/no-auto-return.src.js rename to tests/fixtures/javascript/arrowFunctions/no-auto-return.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/not-strict-arguments.src.js b/tests/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/not-strict-arguments.src.js rename to tests/fixtures/javascript/arrowFunctions/not-strict-arguments.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval-params.src.js b/tests/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/not-strict-eval-params.src.js rename to tests/fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/not-strict-eval.src.js b/tests/fixtures/javascript/arrowFunctions/not-strict-eval.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/not-strict-eval.src.js rename to tests/fixtures/javascript/arrowFunctions/not-strict-eval.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/not-strict-octal.src.js b/tests/fixtures/javascript/arrowFunctions/not-strict-octal.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/not-strict-octal.src.js rename to tests/fixtures/javascript/arrowFunctions/not-strict-octal.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/return-arrow-function.src.js b/tests/fixtures/javascript/arrowFunctions/return-arrow-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/return-arrow-function.src.js rename to tests/fixtures/javascript/arrowFunctions/return-arrow-function.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/return-sequence.src.js b/tests/fixtures/javascript/arrowFunctions/return-sequence.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/return-sequence.src.js rename to tests/fixtures/javascript/arrowFunctions/return-sequence.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/single-param-parens.src.js b/tests/fixtures/javascript/arrowFunctions/single-param-parens.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/single-param-parens.src.js rename to tests/fixtures/javascript/arrowFunctions/single-param-parens.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/single-param-return-identifier.src.js b/tests/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/single-param-return-identifier.src.js rename to tests/fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js diff --git a/tests/fixtures/ecma-features/arrowFunctions/single-param.src.js b/tests/fixtures/javascript/arrowFunctions/single-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/arrowFunctions/single-param.src.js rename to tests/fixtures/javascript/arrowFunctions/single-param.src.js diff --git a/tests/fixtures/basics/delete-expression.src.js b/tests/fixtures/javascript/basics/delete-expression.src.js similarity index 100% rename from tests/fixtures/basics/delete-expression.src.js rename to tests/fixtures/javascript/basics/delete-expression.src.js diff --git a/tests/fixtures/basics/do-while-statements.src.js b/tests/fixtures/javascript/basics/do-while-statements.src.js similarity index 100% rename from tests/fixtures/basics/do-while-statements.src.js rename to tests/fixtures/javascript/basics/do-while-statements.src.js diff --git a/tests/fixtures/basics/identifiers-double-underscore.src.js b/tests/fixtures/javascript/basics/identifiers-double-underscore.src.js similarity index 100% rename from tests/fixtures/basics/identifiers-double-underscore.src.js rename to tests/fixtures/javascript/basics/identifiers-double-underscore.src.js diff --git a/tests/fixtures/basics/instanceof.src.js b/tests/fixtures/javascript/basics/instanceof.src.js similarity index 100% rename from tests/fixtures/basics/instanceof.src.js rename to tests/fixtures/javascript/basics/instanceof.src.js diff --git a/tests/fixtures/basics/new-with-member-expression.src.js b/tests/fixtures/javascript/basics/new-with-member-expression.src.js similarity index 100% rename from tests/fixtures/basics/new-with-member-expression.src.js rename to tests/fixtures/javascript/basics/new-with-member-expression.src.js diff --git a/tests/fixtures/basics/new-without-parens.src.js b/tests/fixtures/javascript/basics/new-without-parens.src.js similarity index 100% rename from tests/fixtures/basics/new-without-parens.src.js rename to tests/fixtures/javascript/basics/new-without-parens.src.js diff --git a/tests/fixtures/basics/typeof-expression.src.js b/tests/fixtures/javascript/basics/typeof-expression.src.js similarity index 100% rename from tests/fixtures/basics/typeof-expression.src.js rename to tests/fixtures/javascript/basics/typeof-expression.src.js diff --git a/tests/fixtures/basics/update-expression.src.js b/tests/fixtures/javascript/basics/update-expression.src.js similarity index 100% rename from tests/fixtures/basics/update-expression.src.js rename to tests/fixtures/javascript/basics/update-expression.src.js diff --git a/tests/fixtures/basics/void-expression.src.js b/tests/fixtures/javascript/basics/void-expression.src.js similarity index 100% rename from tests/fixtures/basics/void-expression.src.js rename to tests/fixtures/javascript/basics/void-expression.src.js diff --git a/tests/fixtures/ecma-features/binaryLiterals/invalid.src.js b/tests/fixtures/javascript/binaryLiterals/invalid.src.js similarity index 100% rename from tests/fixtures/ecma-features/binaryLiterals/invalid.src.js rename to tests/fixtures/javascript/binaryLiterals/invalid.src.js diff --git a/tests/fixtures/ecma-features/binaryLiterals/lowercase.src.js b/tests/fixtures/javascript/binaryLiterals/lowercase.src.js similarity index 100% rename from tests/fixtures/ecma-features/binaryLiterals/lowercase.src.js rename to tests/fixtures/javascript/binaryLiterals/lowercase.src.js diff --git a/tests/fixtures/ecma-features/binaryLiterals/uppercase.src.js b/tests/fixtures/javascript/binaryLiterals/uppercase.src.js similarity index 100% rename from tests/fixtures/ecma-features/binaryLiterals/uppercase.src.js rename to tests/fixtures/javascript/binaryLiterals/uppercase.src.js diff --git a/tests/fixtures/ecma-features/blockBindings/const.src.js b/tests/fixtures/javascript/blockBindings/const.src.js similarity index 100% rename from tests/fixtures/ecma-features/blockBindings/const.src.js rename to tests/fixtures/javascript/blockBindings/const.src.js diff --git a/tests/fixtures/ecma-features/blockBindings/let-in-switchcase.src.js b/tests/fixtures/javascript/blockBindings/let-in-switchcase.src.js similarity index 100% rename from tests/fixtures/ecma-features/blockBindings/let-in-switchcase.src.js rename to tests/fixtures/javascript/blockBindings/let-in-switchcase.src.js diff --git a/tests/fixtures/ecma-features/blockBindings/let.src.js b/tests/fixtures/javascript/blockBindings/let.src.js similarity index 100% rename from tests/fixtures/ecma-features/blockBindings/let.src.js rename to tests/fixtures/javascript/blockBindings/let.src.js diff --git a/tests/fixtures/ecma-features/classes/class-accessor-properties.src.js b/tests/fixtures/javascript/classes/class-accessor-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-accessor-properties.src.js rename to tests/fixtures/javascript/classes/class-accessor-properties.src.js diff --git a/tests/fixtures/ecma-features/classes/class-computed-static-method.src.js b/tests/fixtures/javascript/classes/class-computed-static-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-computed-static-method.src.js rename to tests/fixtures/javascript/classes/class-computed-static-method.src.js diff --git a/tests/fixtures/ecma-features/classes/class-expression.src.js b/tests/fixtures/javascript/classes/class-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-expression.src.js rename to tests/fixtures/javascript/classes/class-expression.src.js diff --git a/tests/fixtures/ecma-features/classes/class-method-named-prototype.src.js b/tests/fixtures/javascript/classes/class-method-named-prototype.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-method-named-prototype.src.js rename to tests/fixtures/javascript/classes/class-method-named-prototype.src.js diff --git a/tests/fixtures/ecma-features/classes/class-method-named-static.src.js b/tests/fixtures/javascript/classes/class-method-named-static.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-method-named-static.src.js rename to tests/fixtures/javascript/classes/class-method-named-static.src.js diff --git a/tests/fixtures/ecma-features/classes/class-method-named-with-space.src.js b/tests/fixtures/javascript/classes/class-method-named-with-space.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-method-named-with-space.src.js rename to tests/fixtures/javascript/classes/class-method-named-with-space.src.js diff --git a/tests/fixtures/ecma-features/classes/class-one-method-super.src.js b/tests/fixtures/javascript/classes/class-one-method-super.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-one-method-super.src.js rename to tests/fixtures/javascript/classes/class-one-method-super.src.js diff --git a/tests/fixtures/ecma-features/classes/class-one-method.src.js b/tests/fixtures/javascript/classes/class-one-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-one-method.src.js rename to tests/fixtures/javascript/classes/class-one-method.src.js diff --git a/tests/fixtures/ecma-features/classes/class-static-method-named-prototype.src.js b/tests/fixtures/javascript/classes/class-static-method-named-prototype.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-static-method-named-prototype.src.js rename to tests/fixtures/javascript/classes/class-static-method-named-prototype.src.js diff --git a/tests/fixtures/ecma-features/classes/class-static-method-named-static.src.js b/tests/fixtures/javascript/classes/class-static-method-named-static.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-static-method-named-static.src.js rename to tests/fixtures/javascript/classes/class-static-method-named-static.src.js diff --git a/tests/fixtures/ecma-features/classes/class-static-method.src.js b/tests/fixtures/javascript/classes/class-static-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-static-method.src.js rename to tests/fixtures/javascript/classes/class-static-method.src.js diff --git a/tests/fixtures/ecma-features/classes/class-static-methods-and-accessor-properties.src.js b/tests/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-static-methods-and-accessor-properties.src.js rename to tests/fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-computed-static-methods.src.js b/tests/fixtures/javascript/classes/class-two-computed-static-methods.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-computed-static-methods.src.js rename to tests/fixtures/javascript/classes/class-two-computed-static-methods.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-methods-computed-constructor.src.js b/tests/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-methods-computed-constructor.src.js rename to tests/fixtures/javascript/classes/class-two-methods-computed-constructor.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-methods-semi.src.js b/tests/fixtures/javascript/classes/class-two-methods-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-methods-semi.src.js rename to tests/fixtures/javascript/classes/class-two-methods-semi.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-methods-three-semi.src.js b/tests/fixtures/javascript/classes/class-two-methods-three-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-methods-three-semi.src.js rename to tests/fixtures/javascript/classes/class-two-methods-three-semi.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-methods-two-semi.src.js b/tests/fixtures/javascript/classes/class-two-methods-two-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-methods-two-semi.src.js rename to tests/fixtures/javascript/classes/class-two-methods-two-semi.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-methods.src.js b/tests/fixtures/javascript/classes/class-two-methods.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-methods.src.js rename to tests/fixtures/javascript/classes/class-two-methods.src.js diff --git a/tests/fixtures/ecma-features/classes/class-two-static-methods-named-constructor.src.js b/tests/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-two-static-methods-named-constructor.src.js rename to tests/fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js diff --git a/tests/fixtures/ecma-features/classes/class-with-constructor-parameters.src.js b/tests/fixtures/javascript/classes/class-with-constructor-parameters.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-with-constructor-parameters.src.js rename to tests/fixtures/javascript/classes/class-with-constructor-parameters.src.js diff --git a/tests/fixtures/ecma-features/classes/class-with-constructor-with-space.src.js b/tests/fixtures/javascript/classes/class-with-constructor-with-space.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-with-constructor-with-space.src.js rename to tests/fixtures/javascript/classes/class-with-constructor-with-space.src.js diff --git a/tests/fixtures/ecma-features/classes/class-with-constructor.src.js b/tests/fixtures/javascript/classes/class-with-constructor.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/class-with-constructor.src.js rename to tests/fixtures/javascript/classes/class-with-constructor.src.js diff --git a/tests/fixtures/ecma-features/classes/derived-class-assign-to-var.src.js b/tests/fixtures/javascript/classes/derived-class-assign-to-var.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/derived-class-assign-to-var.src.js rename to tests/fixtures/javascript/classes/derived-class-assign-to-var.src.js diff --git a/tests/fixtures/ecma-features/classes/derived-class-expression.src.js b/tests/fixtures/javascript/classes/derived-class-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/derived-class-expression.src.js rename to tests/fixtures/javascript/classes/derived-class-expression.src.js diff --git a/tests/fixtures/ecma-features/classes/empty-class-double-semi.src.js b/tests/fixtures/javascript/classes/empty-class-double-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/empty-class-double-semi.src.js rename to tests/fixtures/javascript/classes/empty-class-double-semi.src.js diff --git a/tests/fixtures/ecma-features/classes/empty-class-semi.src.js b/tests/fixtures/javascript/classes/empty-class-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/empty-class-semi.src.js rename to tests/fixtures/javascript/classes/empty-class-semi.src.js diff --git a/tests/fixtures/ecma-features/classes/empty-class.src.js b/tests/fixtures/javascript/classes/empty-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/empty-class.src.js rename to tests/fixtures/javascript/classes/empty-class.src.js diff --git a/tests/fixtures/ecma-features/classes/empty-literal-derived-class.src.js b/tests/fixtures/javascript/classes/empty-literal-derived-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/empty-literal-derived-class.src.js rename to tests/fixtures/javascript/classes/empty-literal-derived-class.src.js diff --git a/tests/fixtures/ecma-features/classes/invalid-class-declaration.src.js b/tests/fixtures/javascript/classes/invalid-class-declaration.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/invalid-class-declaration.src.js rename to tests/fixtures/javascript/classes/invalid-class-declaration.src.js diff --git a/tests/fixtures/ecma-features/classes/invalid-class-setter-declaration.src.js b/tests/fixtures/javascript/classes/invalid-class-setter-declaration.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/invalid-class-setter-declaration.src.js rename to tests/fixtures/javascript/classes/invalid-class-setter-declaration.src.js diff --git a/tests/fixtures/ecma-features/classes/invalid-class-two-super-classes.src.js b/tests/fixtures/javascript/classes/invalid-class-two-super-classes.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/invalid-class-two-super-classes.src.js rename to tests/fixtures/javascript/classes/invalid-class-two-super-classes.src.js diff --git a/tests/fixtures/ecma-features/classes/named-class-expression.src.js b/tests/fixtures/javascript/classes/named-class-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/named-class-expression.src.js rename to tests/fixtures/javascript/classes/named-class-expression.src.js diff --git a/tests/fixtures/ecma-features/classes/named-derived-class-expression.src.js b/tests/fixtures/javascript/classes/named-derived-class-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/classes/named-derived-class-expression.src.js rename to tests/fixtures/javascript/classes/named-derived-class-expression.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/class-constructor.src.js b/tests/fixtures/javascript/defaultParams/class-constructor.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/class-constructor.src.js rename to tests/fixtures/javascript/defaultParams/class-constructor.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/class-method.src.js b/tests/fixtures/javascript/defaultParams/class-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/class-method.src.js rename to tests/fixtures/javascript/defaultParams/class-method.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/declaration.src.js b/tests/fixtures/javascript/defaultParams/declaration.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/declaration.src.js rename to tests/fixtures/javascript/defaultParams/declaration.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/expression.src.js b/tests/fixtures/javascript/defaultParams/expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/expression.src.js rename to tests/fixtures/javascript/defaultParams/expression.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/method.src.js b/tests/fixtures/javascript/defaultParams/method.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/method.src.js rename to tests/fixtures/javascript/defaultParams/method.src.js diff --git a/tests/fixtures/ecma-features/defaultParams/not-all-params.src.js b/tests/fixtures/javascript/defaultParams/not-all-params.src.js similarity index 100% rename from tests/fixtures/ecma-features/defaultParams/not-all-params.src.js rename to tests/fixtures/javascript/defaultParams/not-all-params.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-array.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-array.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-object.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/arrow-param-object.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-array.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-array.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object.src.js b/tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-arrowFunctions/param-defaults-object.src.js rename to tests/fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-const-undefined.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/array-const-undefined.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/array-let-undefined.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/array-let-undefined.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-named.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-named.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-undefined.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/object-const-undefined.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-named.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-named.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-undefined.src.js b/tests/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-blockBindings/object-let-undefined.src.js rename to tests/fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-array.src.js b/tests/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-defaultParams/param-array.src.js rename to tests/fixtures/javascript/destructuring-and-defaultParams/param-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-short.src.js b/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-short.src.js rename to tests/fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-wrapped.src.xjs b/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.xjs similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object-wrapped.src.xjs rename to tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.xjs diff --git a/tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object.src.js b/tests/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-defaultParams/param-object.src.js rename to tests/fixtures/javascript/destructuring-and-defaultParams/param-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-forOf/loop.src.js b/tests/fixtures/javascript/destructuring-and-forOf/loop.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-forOf/loop.src.js rename to tests/fixtures/javascript/destructuring-and-forOf/loop.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/complex-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/complex-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/complex-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/destructured-array-literal.src.js b/tests/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/destructured-array-literal.src.js rename to tests/fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/destructuring-param.src.js b/tests/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/destructuring-param.src.js rename to tests/fixtures/javascript/destructuring-and-spread/destructuring-param.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/error-complex-destructured-spread-first.src.js b/tests/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/error-complex-destructured-spread-first.src.js rename to tests/fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/invalid-not-final-array-empty.src.xjs b/tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.xjs similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/invalid-not-final-array-empty.src.xjs rename to tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.xjs diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/multi-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/multi-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/multi-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/not-final-array.src.xjs b/tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.xjs similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/not-final-array.src.xjs rename to tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.xjs diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/single-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/single-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/single-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/single-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/var-complex-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/var-complex-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/var-destructured-array-literal.src.js b/tests/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/var-destructured-array-literal.src.js rename to tests/fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/var-multi-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/var-multi-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring-and-spread/var-single-destructured.src.js b/tests/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring-and-spread/var-single-destructured.src.js rename to tests/fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js diff --git a/tests/fixtures/ecma-features/destructuring/array-member.src.js b/tests/fixtures/javascript/destructuring/array-member.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/array-member.src.js rename to tests/fixtures/javascript/destructuring/array-member.src.js diff --git a/tests/fixtures/ecma-features/destructuring/array-to-array.src.js b/tests/fixtures/javascript/destructuring/array-to-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/array-to-array.src.js rename to tests/fixtures/javascript/destructuring/array-to-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/array-var-undefined.src.js b/tests/fixtures/javascript/destructuring/array-var-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/array-var-undefined.src.js rename to tests/fixtures/javascript/destructuring/array-var-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-constructor-params-array.src.js b/tests/fixtures/javascript/destructuring/class-constructor-params-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-constructor-params-array.src.js rename to tests/fixtures/javascript/destructuring/class-constructor-params-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-array.src.js b/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-array.src.js rename to tests/fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-object.src.js b/tests/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-constructor-params-defaults-object.src.js rename to tests/fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-constructor-params-object.src.js b/tests/fixtures/javascript/destructuring/class-constructor-params-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-constructor-params-object.src.js rename to tests/fixtures/javascript/destructuring/class-constructor-params-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-method-params-array.src.js b/tests/fixtures/javascript/destructuring/class-method-params-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-method-params-array.src.js rename to tests/fixtures/javascript/destructuring/class-method-params-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-array.src.js b/tests/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-method-params-defaults-array.src.js rename to tests/fixtures/javascript/destructuring/class-method-params-defaults-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-method-params-defaults-object.src.js b/tests/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-method-params-defaults-object.src.js rename to tests/fixtures/javascript/destructuring/class-method-params-defaults-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/class-method-params-object.src.js b/tests/fixtures/javascript/destructuring/class-method-params-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/class-method-params-object.src.js rename to tests/fixtures/javascript/destructuring/class-method-params-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array-all.src.js b/tests/fixtures/javascript/destructuring/defaults-array-all.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array-all.src.js rename to tests/fixtures/javascript/destructuring/defaults-array-all.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array-longform-nested-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array-longform-nested-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-array-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-array-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array-nested-all.src.js b/tests/fixtures/javascript/destructuring/defaults-array-nested-all.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array-nested-all.src.js rename to tests/fixtures/javascript/destructuring/defaults-array-nested-all.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array-nested-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array-nested-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-array-nested-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-array.src.js b/tests/fixtures/javascript/destructuring/defaults-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-array.src.js rename to tests/fixtures/javascript/destructuring/defaults-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-all.src.js b/tests/fixtures/javascript/destructuring/defaults-object-all.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-all.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-all.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-longform-all.src.js b/tests/fixtures/javascript/destructuring/defaults-object-longform-all.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-longform-all.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-longform-all.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-longform-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-longform-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-longform-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-longform.src.js b/tests/fixtures/javascript/destructuring/defaults-object-longform.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-longform.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-longform.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-mixed-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-mixed-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-object-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-nested-all.src.js b/tests/fixtures/javascript/destructuring/defaults-object-nested-all.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-nested-all.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-nested-all.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object-nested-multi.src.js b/tests/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object-nested-multi.src.js rename to tests/fixtures/javascript/destructuring/defaults-object-nested-multi.src.js diff --git a/tests/fixtures/ecma-features/destructuring/defaults-object.src.js b/tests/fixtures/javascript/destructuring/defaults-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/defaults-object.src.js rename to tests/fixtures/javascript/destructuring/defaults-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/destructured-array-catch.src.js b/tests/fixtures/javascript/destructuring/destructured-array-catch.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/destructured-array-catch.src.js rename to tests/fixtures/javascript/destructuring/destructured-array-catch.src.js diff --git a/tests/fixtures/ecma-features/destructuring/destructured-object-catch.src.js b/tests/fixtures/javascript/destructuring/destructured-object-catch.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/destructured-object-catch.src.js rename to tests/fixtures/javascript/destructuring/destructured-object-catch.src.js diff --git a/tests/fixtures/ecma-features/destructuring/invalid-defaults-object-assign.src.js b/tests/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/invalid-defaults-object-assign.src.js rename to tests/fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js diff --git a/tests/fixtures/ecma-features/destructuring/named-param.src.js b/tests/fixtures/javascript/destructuring/named-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/named-param.src.js rename to tests/fixtures/javascript/destructuring/named-param.src.js diff --git a/tests/fixtures/ecma-features/destructuring/nested-array.src.js b/tests/fixtures/javascript/destructuring/nested-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/nested-array.src.js rename to tests/fixtures/javascript/destructuring/nested-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/nested-object.src.js b/tests/fixtures/javascript/destructuring/nested-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/nested-object.src.js rename to tests/fixtures/javascript/destructuring/nested-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/object-var-named.src.js b/tests/fixtures/javascript/destructuring/object-var-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/object-var-named.src.js rename to tests/fixtures/javascript/destructuring/object-var-named.src.js diff --git a/tests/fixtures/ecma-features/destructuring/object-var-undefined.src.js b/tests/fixtures/javascript/destructuring/object-var-undefined.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/object-var-undefined.src.js rename to tests/fixtures/javascript/destructuring/object-var-undefined.src.js diff --git a/tests/fixtures/ecma-features/destructuring/param-defaults-array.src.js b/tests/fixtures/javascript/destructuring/param-defaults-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/param-defaults-array.src.js rename to tests/fixtures/javascript/destructuring/param-defaults-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/param-defaults-object-nested.src.js b/tests/fixtures/javascript/destructuring/param-defaults-object-nested.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/param-defaults-object-nested.src.js rename to tests/fixtures/javascript/destructuring/param-defaults-object-nested.src.js diff --git a/tests/fixtures/ecma-features/destructuring/param-defaults-object.src.js b/tests/fixtures/javascript/destructuring/param-defaults-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/param-defaults-object.src.js rename to tests/fixtures/javascript/destructuring/param-defaults-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-array-wrapped.src.js b/tests/fixtures/javascript/destructuring/params-array-wrapped.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-array-wrapped.src.js rename to tests/fixtures/javascript/destructuring/params-array-wrapped.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-array.src.js b/tests/fixtures/javascript/destructuring/params-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-array.src.js rename to tests/fixtures/javascript/destructuring/params-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-multi-object.src.js b/tests/fixtures/javascript/destructuring/params-multi-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-multi-object.src.js rename to tests/fixtures/javascript/destructuring/params-multi-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-nested-array.src.js b/tests/fixtures/javascript/destructuring/params-nested-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-nested-array.src.js rename to tests/fixtures/javascript/destructuring/params-nested-array.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-nested-object.src.js b/tests/fixtures/javascript/destructuring/params-nested-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-nested-object.src.js rename to tests/fixtures/javascript/destructuring/params-nested-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-object-wrapped.src.js b/tests/fixtures/javascript/destructuring/params-object-wrapped.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-object-wrapped.src.js rename to tests/fixtures/javascript/destructuring/params-object-wrapped.src.js diff --git a/tests/fixtures/ecma-features/destructuring/params-object.src.js b/tests/fixtures/javascript/destructuring/params-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/params-object.src.js rename to tests/fixtures/javascript/destructuring/params-object.src.js diff --git a/tests/fixtures/ecma-features/destructuring/sparse-array.src.js b/tests/fixtures/javascript/destructuring/sparse-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/destructuring/sparse-array.src.js rename to tests/fixtures/javascript/destructuring/sparse-array.src.js diff --git a/tests/fixtures/ecma-features/experimentalAsyncIteration/async-generators.src.js b/tests/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalAsyncIteration/async-generators.src.js rename to tests/fixtures/javascript/experimentalAsyncIteration/async-generators.src.js diff --git a/tests/fixtures/ecma-features/experimentalAsyncIteration/async-iterator.src.js b/tests/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalAsyncIteration/async-iterator.src.js rename to tests/fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js diff --git a/tests/fixtures/ecma-features/experimentalDynamicImport/dynamic-import.src.js b/tests/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalDynamicImport/dynamic-import.src.js rename to tests/fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/arg-spread.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/arg-spread.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/destructuring-assign-mirror.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/destructuring-assign-mirror.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/function-parameter-object-spread.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/function-parameter-object-spread.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/invalid-rest.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/object-rest.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/object-rest.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/property-spread.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/property-spread.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-method-args.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-method-args.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-methods.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-methods.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-properties.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/shorthand-properties.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/single-spread.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/single-spread.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/spread-trailing-comma.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/spread-trailing-comma.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js diff --git a/tests/fixtures/ecma-features/experimentalObjectRestSpread/two-spread.src.js b/tests/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalObjectRestSpread/two-spread.src.js rename to tests/fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js diff --git a/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js b/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js rename to tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js diff --git a/tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding.src.js b/tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js similarity index 100% rename from tests/fixtures/ecma-features/experimentalOptionalCatchBinding/optional-catch-binding.src.js rename to tests/fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js diff --git a/tests/fixtures/ecma-features/exponentiationOperators/exponential-operators.src.js b/tests/fixtures/javascript/exponentiationOperators/exponential-operators.src.js similarity index 100% rename from tests/fixtures/ecma-features/exponentiationOperators/exponential-operators.src.js rename to tests/fixtures/javascript/exponentiationOperators/exponential-operators.src.js diff --git a/tests/fixtures/ecma-features/forOf/for-of-with-function-initializer.src.js b/tests/fixtures/javascript/forOf/for-of-with-function-initializer.src.js similarity index 100% rename from tests/fixtures/ecma-features/forOf/for-of-with-function-initializer.src.js rename to tests/fixtures/javascript/forOf/for-of-with-function-initializer.src.js diff --git a/tests/fixtures/ecma-features/forOf/for-of-with-var-and-braces.src.js b/tests/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js similarity index 100% rename from tests/fixtures/ecma-features/forOf/for-of-with-var-and-braces.src.js rename to tests/fixtures/javascript/forOf/for-of-with-var-and-braces.src.js diff --git a/tests/fixtures/ecma-features/forOf/for-of-with-var-and-no-braces.src.js b/tests/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js similarity index 100% rename from tests/fixtures/ecma-features/forOf/for-of-with-var-and-no-braces.src.js rename to tests/fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js diff --git a/tests/fixtures/ecma-features/forOf/invalid-for-of-with-const-and-no-braces.src.js b/tests/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js similarity index 100% rename from tests/fixtures/ecma-features/forOf/invalid-for-of-with-const-and-no-braces.src.js rename to tests/fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js diff --git a/tests/fixtures/ecma-features/forOf/invalid-for-of-with-let-and-no-braces.src.js b/tests/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js similarity index 100% rename from tests/fixtures/ecma-features/forOf/invalid-for-of-with-let-and-no-braces.src.js rename to tests/fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js diff --git a/tests/fixtures/ecma-features/generators/anonymous-generator.src.js b/tests/fixtures/javascript/generators/anonymous-generator.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/anonymous-generator.src.js rename to tests/fixtures/javascript/generators/anonymous-generator.src.js diff --git a/tests/fixtures/ecma-features/generators/async-generator-function.src.js b/tests/fixtures/javascript/generators/async-generator-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/async-generator-function.src.js rename to tests/fixtures/javascript/generators/async-generator-function.src.js diff --git a/tests/fixtures/ecma-features/generators/async-generator-method.src.js b/tests/fixtures/javascript/generators/async-generator-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/async-generator-method.src.js rename to tests/fixtures/javascript/generators/async-generator-method.src.js diff --git a/tests/fixtures/ecma-features/generators/double-yield.src.js b/tests/fixtures/javascript/generators/double-yield.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/double-yield.src.js rename to tests/fixtures/javascript/generators/double-yield.src.js diff --git a/tests/fixtures/ecma-features/generators/empty-generator-declaration.src.js b/tests/fixtures/javascript/generators/empty-generator-declaration.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/empty-generator-declaration.src.js rename to tests/fixtures/javascript/generators/empty-generator-declaration.src.js diff --git a/tests/fixtures/ecma-features/generators/generator-declaration.src.js b/tests/fixtures/javascript/generators/generator-declaration.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/generator-declaration.src.js rename to tests/fixtures/javascript/generators/generator-declaration.src.js diff --git a/tests/fixtures/ecma-features/generators/yield-delegation.src.js b/tests/fixtures/javascript/generators/yield-delegation.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/yield-delegation.src.js rename to tests/fixtures/javascript/generators/yield-delegation.src.js diff --git a/tests/fixtures/ecma-features/generators/yield-without-value-in-call.src.js b/tests/fixtures/javascript/generators/yield-without-value-in-call.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/yield-without-value-in-call.src.js rename to tests/fixtures/javascript/generators/yield-without-value-in-call.src.js diff --git a/tests/fixtures/ecma-features/generators/yield-without-value-no-semi.src.js b/tests/fixtures/javascript/generators/yield-without-value-no-semi.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/yield-without-value-no-semi.src.js rename to tests/fixtures/javascript/generators/yield-without-value-no-semi.src.js diff --git a/tests/fixtures/ecma-features/generators/yield-without-value.src.js b/tests/fixtures/javascript/generators/yield-without-value.src.js similarity index 100% rename from tests/fixtures/ecma-features/generators/yield-without-value.src.js rename to tests/fixtures/javascript/generators/yield-without-value.src.js diff --git a/tests/fixtures/ecma-features/globalReturn/return-identifier.src.js b/tests/fixtures/javascript/globalReturn/return-identifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/globalReturn/return-identifier.src.js rename to tests/fixtures/javascript/globalReturn/return-identifier.src.js diff --git a/tests/fixtures/ecma-features/globalReturn/return-no-arg.src.js b/tests/fixtures/javascript/globalReturn/return-no-arg.src.js similarity index 100% rename from tests/fixtures/ecma-features/globalReturn/return-no-arg.src.js rename to tests/fixtures/javascript/globalReturn/return-no-arg.src.js diff --git a/tests/fixtures/ecma-features/globalReturn/return-true.src.js b/tests/fixtures/javascript/globalReturn/return-true.src.js similarity index 100% rename from tests/fixtures/ecma-features/globalReturn/return-true.src.js rename to tests/fixtures/javascript/globalReturn/return-true.src.js diff --git a/tests/fixtures/ecma-features/importMeta/simple-import-meta.src.js b/tests/fixtures/javascript/importMeta/simple-import-meta.src.js similarity index 100% rename from tests/fixtures/ecma-features/importMeta/simple-import-meta.src.js rename to tests/fixtures/javascript/importMeta/simple-import-meta.src.js diff --git a/tests/fixtures/ecma-features/modules/error-delete.src.js b/tests/fixtures/javascript/modules/error-delete.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/error-delete.src.js rename to tests/fixtures/javascript/modules/error-delete.src.js diff --git a/tests/fixtures/ecma-features/modules/error-function.src.js b/tests/fixtures/javascript/modules/error-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/error-function.src.js rename to tests/fixtures/javascript/modules/error-function.src.js diff --git a/tests/fixtures/ecma-features/modules/error-strict.src.js b/tests/fixtures/javascript/modules/error-strict.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/error-strict.src.js rename to tests/fixtures/javascript/modules/error-strict.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-array.src.js b/tests/fixtures/javascript/modules/export-default-array.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-array.src.js rename to tests/fixtures/javascript/modules/export-default-array.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-class.src.js b/tests/fixtures/javascript/modules/export-default-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-class.src.js rename to tests/fixtures/javascript/modules/export-default-class.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-expression.src.js b/tests/fixtures/javascript/modules/export-default-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-expression.src.js rename to tests/fixtures/javascript/modules/export-default-expression.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-function.src.js b/tests/fixtures/javascript/modules/export-default-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-function.src.js rename to tests/fixtures/javascript/modules/export-default-function.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-named-class.src.js b/tests/fixtures/javascript/modules/export-default-named-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-named-class.src.js rename to tests/fixtures/javascript/modules/export-default-named-class.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-named-function.src.js b/tests/fixtures/javascript/modules/export-default-named-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-named-function.src.js rename to tests/fixtures/javascript/modules/export-default-named-function.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-number.src.js b/tests/fixtures/javascript/modules/export-default-number.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-number.src.js rename to tests/fixtures/javascript/modules/export-default-number.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-object.src.js b/tests/fixtures/javascript/modules/export-default-object.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-object.src.js rename to tests/fixtures/javascript/modules/export-default-object.src.js diff --git a/tests/fixtures/ecma-features/modules/export-default-value.src.js b/tests/fixtures/javascript/modules/export-default-value.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-default-value.src.js rename to tests/fixtures/javascript/modules/export-default-value.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-batch.src.js b/tests/fixtures/javascript/modules/export-from-batch.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-batch.src.js rename to tests/fixtures/javascript/modules/export-from-batch.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-default.src.js b/tests/fixtures/javascript/modules/export-from-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-default.src.js rename to tests/fixtures/javascript/modules/export-from-default.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-named-as-default.src.js b/tests/fixtures/javascript/modules/export-from-named-as-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-named-as-default.src.js rename to tests/fixtures/javascript/modules/export-from-named-as-default.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-named-as-specifier.src.js b/tests/fixtures/javascript/modules/export-from-named-as-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-named-as-specifier.src.js rename to tests/fixtures/javascript/modules/export-from-named-as-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-named-as-specifiers.src.js b/tests/fixtures/javascript/modules/export-from-named-as-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-named-as-specifiers.src.js rename to tests/fixtures/javascript/modules/export-from-named-as-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-specifier.src.js b/tests/fixtures/javascript/modules/export-from-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-specifier.src.js rename to tests/fixtures/javascript/modules/export-from-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/export-from-specifiers.src.js b/tests/fixtures/javascript/modules/export-from-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-from-specifiers.src.js rename to tests/fixtures/javascript/modules/export-from-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/export-function.src.js b/tests/fixtures/javascript/modules/export-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-function.src.js rename to tests/fixtures/javascript/modules/export-function.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-as-default.src.js b/tests/fixtures/javascript/modules/export-named-as-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-as-default.src.js rename to tests/fixtures/javascript/modules/export-named-as-default.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-as-specifier.src.js b/tests/fixtures/javascript/modules/export-named-as-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-as-specifier.src.js rename to tests/fixtures/javascript/modules/export-named-as-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-as-specifiers.src.js b/tests/fixtures/javascript/modules/export-named-as-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-as-specifiers.src.js rename to tests/fixtures/javascript/modules/export-named-as-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-class.src.js b/tests/fixtures/javascript/modules/export-named-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-class.src.js rename to tests/fixtures/javascript/modules/export-named-class.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-empty.src.js b/tests/fixtures/javascript/modules/export-named-empty.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-empty.src.js rename to tests/fixtures/javascript/modules/export-named-empty.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-specifier.src.js b/tests/fixtures/javascript/modules/export-named-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-specifier.src.js rename to tests/fixtures/javascript/modules/export-named-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-specifiers-comma.src.js b/tests/fixtures/javascript/modules/export-named-specifiers-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-specifiers-comma.src.js rename to tests/fixtures/javascript/modules/export-named-specifiers-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/export-named-specifiers.src.js b/tests/fixtures/javascript/modules/export-named-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-named-specifiers.src.js rename to tests/fixtures/javascript/modules/export-named-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/export-var-anonymous-function.src.js b/tests/fixtures/javascript/modules/export-var-anonymous-function.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-var-anonymous-function.src.js rename to tests/fixtures/javascript/modules/export-var-anonymous-function.src.js diff --git a/tests/fixtures/ecma-features/modules/export-var-number.src.js b/tests/fixtures/javascript/modules/export-var-number.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-var-number.src.js rename to tests/fixtures/javascript/modules/export-var-number.src.js diff --git a/tests/fixtures/ecma-features/modules/export-var.src.js b/tests/fixtures/javascript/modules/export-var.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/export-var.src.js rename to tests/fixtures/javascript/modules/export-var.src.js diff --git a/tests/fixtures/ecma-features/modules/import-default-and-named-specifiers.src.js b/tests/fixtures/javascript/modules/import-default-and-named-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-default-and-named-specifiers.src.js rename to tests/fixtures/javascript/modules/import-default-and-named-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/import-default-and-namespace-specifiers.src.js b/tests/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-default-and-namespace-specifiers.src.js rename to tests/fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/import-default-as.src.js b/tests/fixtures/javascript/modules/import-default-as.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-default-as.src.js rename to tests/fixtures/javascript/modules/import-default-as.src.js diff --git a/tests/fixtures/ecma-features/modules/import-default.src.js b/tests/fixtures/javascript/modules/import-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-default.src.js rename to tests/fixtures/javascript/modules/import-default.src.js diff --git a/tests/fixtures/ecma-features/modules/import-jquery.src.js b/tests/fixtures/javascript/modules/import-jquery.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-jquery.src.js rename to tests/fixtures/javascript/modules/import-jquery.src.js diff --git a/tests/fixtures/ecma-features/modules/import-module.src.js b/tests/fixtures/javascript/modules/import-module.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-module.src.js rename to tests/fixtures/javascript/modules/import-module.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-as-specifier.src.js b/tests/fixtures/javascript/modules/import-named-as-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-as-specifier.src.js rename to tests/fixtures/javascript/modules/import-named-as-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-as-specifiers.src.js b/tests/fixtures/javascript/modules/import-named-as-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-as-specifiers.src.js rename to tests/fixtures/javascript/modules/import-named-as-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-empty.src.js b/tests/fixtures/javascript/modules/import-named-empty.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-empty.src.js rename to tests/fixtures/javascript/modules/import-named-empty.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-specifier.src.js b/tests/fixtures/javascript/modules/import-named-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-specifier.src.js rename to tests/fixtures/javascript/modules/import-named-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-specifiers-comma.src.js b/tests/fixtures/javascript/modules/import-named-specifiers-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-specifiers-comma.src.js rename to tests/fixtures/javascript/modules/import-named-specifiers-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/import-named-specifiers.src.js b/tests/fixtures/javascript/modules/import-named-specifiers.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-named-specifiers.src.js rename to tests/fixtures/javascript/modules/import-named-specifiers.src.js diff --git a/tests/fixtures/ecma-features/modules/import-namespace-specifier.src.js b/tests/fixtures/javascript/modules/import-namespace-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-namespace-specifier.src.js rename to tests/fixtures/javascript/modules/import-namespace-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/import-null-as-nil.src.js b/tests/fixtures/javascript/modules/import-null-as-nil.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/import-null-as-nil.src.js rename to tests/fixtures/javascript/modules/import-null-as-nil.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-await.src.js b/tests/fixtures/javascript/modules/invalid-await.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-await.src.js rename to tests/fixtures/javascript/modules/invalid-await.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-class.src.js b/tests/fixtures/javascript/modules/invalid-class.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-class.src.js rename to tests/fixtures/javascript/modules/invalid-class.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-batch-missing-from-clause.src.js b/tests/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-batch-missing-from-clause.src.js rename to tests/fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-batch-token.src.js b/tests/fixtures/javascript/modules/invalid-export-batch-token.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-batch-token.src.js rename to tests/fixtures/javascript/modules/invalid-export-batch-token.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-default-equal.src.js b/tests/fixtures/javascript/modules/invalid-export-default-equal.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-default-equal.src.js rename to tests/fixtures/javascript/modules/invalid-export-default-equal.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-default-token.src.js b/tests/fixtures/javascript/modules/invalid-export-default-token.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-default-token.src.js rename to tests/fixtures/javascript/modules/invalid-export-default-token.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-default.src.js b/tests/fixtures/javascript/modules/invalid-export-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-default.src.js rename to tests/fixtures/javascript/modules/invalid-export-default.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-named-default.src.js b/tests/fixtures/javascript/modules/invalid-export-named-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-named-default.src.js rename to tests/fixtures/javascript/modules/invalid-export-named-default.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-named-extra-comma.src.js b/tests/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-named-extra-comma.src.js rename to tests/fixtures/javascript/modules/invalid-export-named-extra-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-export-named-middle-comma.src.js b/tests/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-export-named-middle-comma.src.js rename to tests/fixtures/javascript/modules/invalid-export-named-middle-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-default-after-named-after-default.src.js b/tests/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-default-after-named-after-default.src.js rename to tests/fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-default-after-named.src.js b/tests/fixtures/javascript/modules/invalid-import-default-after-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-default-after-named.src.js rename to tests/fixtures/javascript/modules/invalid-import-default-after-named.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-default-missing-module-specifier.src.js b/tests/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-default-missing-module-specifier.src.js rename to tests/fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-default-module-specifier.src.js b/tests/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-default-module-specifier.src.js rename to tests/fixtures/javascript/modules/invalid-import-default-module-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-default.src.js b/tests/fixtures/javascript/modules/invalid-import-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-default.src.js rename to tests/fixtures/javascript/modules/invalid-import-default.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-missing-module-specifier.src.js b/tests/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-missing-module-specifier.src.js rename to tests/fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-module-specifier.src.js b/tests/fixtures/javascript/modules/invalid-import-module-specifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-module-specifier.src.js rename to tests/fixtures/javascript/modules/invalid-import-module-specifier.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-named-after-named.src.js b/tests/fixtures/javascript/modules/invalid-import-named-after-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-named-after-named.src.js rename to tests/fixtures/javascript/modules/invalid-import-named-after-named.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-named-after-namespace.src.js b/tests/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-named-after-namespace.src.js rename to tests/fixtures/javascript/modules/invalid-import-named-after-namespace.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-named-as-missing-from.src.js b/tests/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-named-as-missing-from.src.js rename to tests/fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-named-extra-comma.src.js b/tests/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-named-extra-comma.src.js rename to tests/fixtures/javascript/modules/invalid-import-named-extra-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-named-middle-comma.src.js b/tests/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-named-middle-comma.src.js rename to tests/fixtures/javascript/modules/invalid-import-named-middle-comma.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-namespace-after-named.src.js b/tests/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-namespace-after-named.src.js rename to tests/fixtures/javascript/modules/invalid-import-namespace-after-named.src.js diff --git a/tests/fixtures/ecma-features/modules/invalid-import-namespace-missing-as.src.js b/tests/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js similarity index 100% rename from tests/fixtures/ecma-features/modules/invalid-import-namespace-missing-as.src.js rename to tests/fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js diff --git a/tests/fixtures/ecma-features/newTarget/invalid-new-target.src.js b/tests/fixtures/javascript/newTarget/invalid-new-target.src.js similarity index 100% rename from tests/fixtures/ecma-features/newTarget/invalid-new-target.src.js rename to tests/fixtures/javascript/newTarget/invalid-new-target.src.js diff --git a/tests/fixtures/ecma-features/newTarget/invalid-unknown-property.src.js b/tests/fixtures/javascript/newTarget/invalid-unknown-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/newTarget/invalid-unknown-property.src.js rename to tests/fixtures/javascript/newTarget/invalid-unknown-property.src.js diff --git a/tests/fixtures/ecma-features/newTarget/simple-new-target.src.js b/tests/fixtures/javascript/newTarget/simple-new-target.src.js similarity index 100% rename from tests/fixtures/ecma-features/newTarget/simple-new-target.src.js rename to tests/fixtures/javascript/newTarget/simple-new-target.src.js diff --git a/tests/fixtures/ecma-features/objectLiteral/object-literal-in-lhs.src.js b/tests/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteral/object-literal-in-lhs.src.js rename to tests/fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-addition-property.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-addition-property.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-and-identifier.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-and-identifier.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-getter-and-setter.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-getter-and-setter.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-string-property.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-string-property.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-variable-property.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/computed-variable-property.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-computed-variable-property.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-computed-variable-property.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-addition.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-addition.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-method.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression-with-method.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression.src.js b/tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralComputedProperties/standalone-expression.src.js rename to tests/fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-property.src.js b/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-property.src.js rename to tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-string-property.src.js b/tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralDuplicateProperties/error-proto-string-property.src.js rename to tests/fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js b/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js rename to tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js b/tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js rename to tests/fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/invalid-method-no-braces.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/invalid-method-no-braces.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/method-property.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/method-property.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-get.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-get.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-set.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-named-set.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-argument.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-argument.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-string-name.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method-with-string-name.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/simple-method.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandMethods/string-name-method-property.src.js b/tests/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandMethods/string-name-method-property.src.js rename to tests/fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js diff --git a/tests/fixtures/ecma-features/objectLiteralShorthandProperties/shorthand-properties.src.js b/tests/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js similarity index 100% rename from tests/fixtures/ecma-features/objectLiteralShorthandProperties/shorthand-properties.src.js rename to tests/fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js diff --git a/tests/fixtures/ecma-features/octalLiterals/invalid.src.js b/tests/fixtures/javascript/octalLiterals/invalid.src.js similarity index 100% rename from tests/fixtures/ecma-features/octalLiterals/invalid.src.js rename to tests/fixtures/javascript/octalLiterals/invalid.src.js diff --git a/tests/fixtures/ecma-features/octalLiterals/lowercase.src.js b/tests/fixtures/javascript/octalLiterals/lowercase.src.js similarity index 100% rename from tests/fixtures/ecma-features/octalLiterals/lowercase.src.js rename to tests/fixtures/javascript/octalLiterals/lowercase.src.js diff --git a/tests/fixtures/ecma-features/octalLiterals/strict-uppercase.src.js b/tests/fixtures/javascript/octalLiterals/strict-uppercase.src.js similarity index 100% rename from tests/fixtures/ecma-features/octalLiterals/strict-uppercase.src.js rename to tests/fixtures/javascript/octalLiterals/strict-uppercase.src.js diff --git a/tests/fixtures/ecma-features/octalLiterals/uppercase.src.js b/tests/fixtures/javascript/octalLiterals/uppercase.src.js similarity index 100% rename from tests/fixtures/ecma-features/octalLiterals/uppercase.src.js rename to tests/fixtures/javascript/octalLiterals/uppercase.src.js diff --git a/tests/fixtures/ecma-features/regex/regexp-simple.src.js b/tests/fixtures/javascript/regex/regexp-simple.src.js similarity index 100% rename from tests/fixtures/ecma-features/regex/regexp-simple.src.js rename to tests/fixtures/javascript/regex/regexp-simple.src.js diff --git a/tests/fixtures/ecma-features/regexUFlag/regex-u-extended-escape.src.js b/tests/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js similarity index 100% rename from tests/fixtures/ecma-features/regexUFlag/regex-u-extended-escape.src.js rename to tests/fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js diff --git a/tests/fixtures/ecma-features/regexUFlag/regex-u-invalid-extended-escape.src.js b/tests/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js similarity index 100% rename from tests/fixtures/ecma-features/regexUFlag/regex-u-invalid-extended-escape.src.js rename to tests/fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js diff --git a/tests/fixtures/ecma-features/regexUFlag/regex-u-simple.src.js b/tests/fixtures/javascript/regexUFlag/regex-u-simple.src.js similarity index 100% rename from tests/fixtures/ecma-features/regexUFlag/regex-u-simple.src.js rename to tests/fixtures/javascript/regexUFlag/regex-u-simple.src.js diff --git a/tests/fixtures/ecma-features/regexYFlag/regexp-y-simple.src.js b/tests/fixtures/javascript/regexYFlag/regexp-y-simple.src.js similarity index 100% rename from tests/fixtures/ecma-features/regexYFlag/regexp-y-simple.src.js rename to tests/fixtures/javascript/regexYFlag/regexp-y-simple.src.js diff --git a/tests/fixtures/ecma-features/restParams/basic-rest.src.js b/tests/fixtures/javascript/restParams/basic-rest.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/basic-rest.src.js rename to tests/fixtures/javascript/restParams/basic-rest.src.js diff --git a/tests/fixtures/ecma-features/restParams/class-constructor.src.js b/tests/fixtures/javascript/restParams/class-constructor.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/class-constructor.src.js rename to tests/fixtures/javascript/restParams/class-constructor.src.js diff --git a/tests/fixtures/ecma-features/restParams/class-method.src.js b/tests/fixtures/javascript/restParams/class-method.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/class-method.src.js rename to tests/fixtures/javascript/restParams/class-method.src.js diff --git a/tests/fixtures/ecma-features/restParams/error-no-default.src.js b/tests/fixtures/javascript/restParams/error-no-default.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/error-no-default.src.js rename to tests/fixtures/javascript/restParams/error-no-default.src.js diff --git a/tests/fixtures/ecma-features/restParams/error-not-last.src.js b/tests/fixtures/javascript/restParams/error-not-last.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/error-not-last.src.js rename to tests/fixtures/javascript/restParams/error-not-last.src.js diff --git a/tests/fixtures/ecma-features/restParams/func-expression-multi.src.js b/tests/fixtures/javascript/restParams/func-expression-multi.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/func-expression-multi.src.js rename to tests/fixtures/javascript/restParams/func-expression-multi.src.js diff --git a/tests/fixtures/ecma-features/restParams/func-expression.src.js b/tests/fixtures/javascript/restParams/func-expression.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/func-expression.src.js rename to tests/fixtures/javascript/restParams/func-expression.src.js diff --git a/tests/fixtures/ecma-features/restParams/invalid-rest-param.src.js b/tests/fixtures/javascript/restParams/invalid-rest-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/invalid-rest-param.src.js rename to tests/fixtures/javascript/restParams/invalid-rest-param.src.js diff --git a/tests/fixtures/ecma-features/restParams/single-rest.src.js b/tests/fixtures/javascript/restParams/single-rest.src.js similarity index 100% rename from tests/fixtures/ecma-features/restParams/single-rest.src.js rename to tests/fixtures/javascript/restParams/single-rest.src.js diff --git a/tests/fixtures/ecma-features/spread/error-invalid-if.src.js b/tests/fixtures/javascript/spread/error-invalid-if.src.js similarity index 100% rename from tests/fixtures/ecma-features/spread/error-invalid-if.src.js rename to tests/fixtures/javascript/spread/error-invalid-if.src.js diff --git a/tests/fixtures/ecma-features/spread/error-invalid-sequence.src.js b/tests/fixtures/javascript/spread/error-invalid-sequence.src.js similarity index 100% rename from tests/fixtures/ecma-features/spread/error-invalid-sequence.src.js rename to tests/fixtures/javascript/spread/error-invalid-sequence.src.js diff --git a/tests/fixtures/ecma-features/spread/multi-function-call.src.js b/tests/fixtures/javascript/spread/multi-function-call.src.js similarity index 100% rename from tests/fixtures/ecma-features/spread/multi-function-call.src.js rename to tests/fixtures/javascript/spread/multi-function-call.src.js diff --git a/tests/fixtures/ecma-features/spread/not-final-param.src.js b/tests/fixtures/javascript/spread/not-final-param.src.js similarity index 100% rename from tests/fixtures/ecma-features/spread/not-final-param.src.js rename to tests/fixtures/javascript/spread/not-final-param.src.js diff --git a/tests/fixtures/ecma-features/spread/simple-function-call.src.js b/tests/fixtures/javascript/spread/simple-function-call.src.js similarity index 100% rename from tests/fixtures/ecma-features/spread/simple-function-call.src.js rename to tests/fixtures/javascript/spread/simple-function-call.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/deeply-nested.src.js b/tests/fixtures/javascript/templateStrings/deeply-nested.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/deeply-nested.src.js rename to tests/fixtures/javascript/templateStrings/deeply-nested.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/error-octal-literal.src.js b/tests/fixtures/javascript/templateStrings/error-octal-literal.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/error-octal-literal.src.js rename to tests/fixtures/javascript/templateStrings/error-octal-literal.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/escape-characters.src.js b/tests/fixtures/javascript/templateStrings/escape-characters.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/escape-characters.src.js rename to tests/fixtures/javascript/templateStrings/escape-characters.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/expressions.src.js b/tests/fixtures/javascript/templateStrings/expressions.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/expressions.src.js rename to tests/fixtures/javascript/templateStrings/expressions.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/multi-line-template-string.src.js b/tests/fixtures/javascript/templateStrings/multi-line-template-string.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/multi-line-template-string.src.js rename to tests/fixtures/javascript/templateStrings/multi-line-template-string.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/simple-template-string.src.js b/tests/fixtures/javascript/templateStrings/simple-template-string.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/simple-template-string.src.js rename to tests/fixtures/javascript/templateStrings/simple-template-string.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/single-dollar-sign.src.js b/tests/fixtures/javascript/templateStrings/single-dollar-sign.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/single-dollar-sign.src.js rename to tests/fixtures/javascript/templateStrings/single-dollar-sign.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/tagged-no-placeholders.src.js b/tests/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/tagged-no-placeholders.src.js rename to tests/fixtures/javascript/templateStrings/tagged-no-placeholders.src.js diff --git a/tests/fixtures/ecma-features/templateStrings/tagged-template-string.src.js b/tests/fixtures/javascript/templateStrings/tagged-template-string.src.js similarity index 100% rename from tests/fixtures/ecma-features/templateStrings/tagged-template-string.src.js rename to tests/fixtures/javascript/templateStrings/tagged-template-string.src.js diff --git a/tests/fixtures/ecma-features/unicodeCodePointEscapes/basic-string-literal.src.js b/tests/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js similarity index 100% rename from tests/fixtures/ecma-features/unicodeCodePointEscapes/basic-string-literal.src.js rename to tests/fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js diff --git a/tests/fixtures/ecma-features/unicodeCodePointEscapes/complex-string-literal.src.js b/tests/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js similarity index 100% rename from tests/fixtures/ecma-features/unicodeCodePointEscapes/complex-string-literal.src.js rename to tests/fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js diff --git a/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-empty-escape.src.js b/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js similarity index 100% rename from tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-empty-escape.src.js rename to tests/fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js diff --git a/tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-too-large-escape.src.js b/tests/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js similarity index 100% rename from tests/fixtures/ecma-features/unicodeCodePointEscapes/invalid-too-large-escape.src.js rename to tests/fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js diff --git a/tests/fixtures/semanticInfo/badTSConfig/app.ts b/tests/fixtures/semanticInfo/badTSConfig/app.ts new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/semanticInfo/badTSConfig/tsconfig.json b/tests/fixtures/semanticInfo/badTSConfig/tsconfig.json new file mode 100644 index 0000000..134439a --- /dev/null +++ b/tests/fixtures/semanticInfo/badTSConfig/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compileOnSave": "hello", + "compilerOptions": { + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "strict": true, /* Enable all strict type-checking options. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + } + } \ No newline at end of file diff --git a/tests/fixtures/semanticInfo/export-file.src.ts b/tests/fixtures/semanticInfo/export-file.src.ts new file mode 100644 index 0000000..8bb4cb8 --- /dev/null +++ b/tests/fixtures/semanticInfo/export-file.src.ts @@ -0,0 +1 @@ +export default [3, 4, 5]; \ No newline at end of file diff --git a/tests/fixtures/semanticInfo/import-file.src.ts b/tests/fixtures/semanticInfo/import-file.src.ts new file mode 100644 index 0000000..da5d202 --- /dev/null +++ b/tests/fixtures/semanticInfo/import-file.src.ts @@ -0,0 +1,2 @@ +import arr from "./export-file.src"; +arr.push(6, 7); \ No newline at end of file diff --git a/tests/fixtures/semanticInfo/isolated-file.src.ts b/tests/fixtures/semanticInfo/isolated-file.src.ts new file mode 100644 index 0000000..ca04667 --- /dev/null +++ b/tests/fixtures/semanticInfo/isolated-file.src.ts @@ -0,0 +1 @@ +const x = [3, 4, 5]; \ No newline at end of file diff --git a/tests/fixtures/semanticInfo/tsconfig.json b/tests/fixtures/semanticInfo/tsconfig.json new file mode 100644 index 0000000..3caa872 --- /dev/null +++ b/tests/fixtures/semanticInfo/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "strict": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/tests/lib/__snapshots__/basics.ts.snap b/tests/lib/__snapshots__/basics.ts.snap deleted file mode 100644 index 68590eb..0000000 --- a/tests/lib/__snapshots__/basics.ts.snap +++ /dev/null @@ -1,3140 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "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[`basics fixtures/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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "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", -} -`; diff --git a/tests/lib/__snapshots__/ecma-features.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap similarity index 96% rename from tests/lib/__snapshots__/ecma-features.ts.snap rename to tests/lib/__snapshots__/javascript.ts.snap index f696d0d..35c0cb4 100644 --- a/tests/lib/__snapshots__/ecma-features.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ecma-features fixtures/arrayLiteral/array-literal-in-lhs.src 1`] = ` +exports[`javascript fixtures/arrayLiteral/array-literal-in-lhs.src 1`] = ` Object { "body": Array [ Object { @@ -349,7 +349,7 @@ Object { } `; -exports[`ecma-features fixtures/arrayLiteral/array-literals-in-binary-expr.src 1`] = ` +exports[`javascript fixtures/arrayLiteral/array-literals-in-binary-expr.src 1`] = ` Object { "body": Array [ Object { @@ -553,7 +553,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/as-param.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/as-param.src 1`] = ` Object { "body": Array [ Object { @@ -834,7 +834,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/as-param-with-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/as-param-with-params.src 1`] = ` Object { "body": Array [ Object { @@ -1206,7 +1206,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/basic.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/basic.src 1`] = ` Object { "body": Array [ Object { @@ -1379,7 +1379,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/basic-in-binary-expression.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/basic-in-binary-expression.src 1`] = ` Object { "body": Array [ Object { @@ -2062,7 +2062,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/block-body.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/block-body.src 1`] = ` Object { "body": Array [ Object { @@ -2326,7 +2326,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/block-body-not-object.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/block-body-not-object.src 1`] = ` Object { "body": Array [ Object { @@ -2643,7 +2643,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-dup-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-dup-params.src 1`] = ` Object { "body": Array [ Object { @@ -2907,17 +2907,17 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-missing-paren.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-missing-paren.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/arrowFunctions/error-not-arrow.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/arrowFunctions/error-not-arrow.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/arrowFunctions/error-numeric-param.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-numeric-param.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/arrowFunctions/error-numeric-param-multi.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-numeric-param-multi.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/arrowFunctions/error-reverse-arrow.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/arrowFunctions/error-reverse-arrow.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/arrowFunctions/error-strict-default-param-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-default-param-eval.src 1`] = ` Object { "body": Array [ Object { @@ -3271,7 +3271,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-dup-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-dup-params.src 1`] = ` Object { "body": Array [ Object { @@ -3607,7 +3607,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-eval.src 1`] = ` Object { "body": Array [ Object { @@ -3943,7 +3943,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-eval-return.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-eval-return.src 1`] = ` Object { "body": Array [ Object { @@ -4207,7 +4207,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-octal.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-octal.src 1`] = ` Object { "body": Array [ Object { @@ -4489,7 +4489,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-param-arguments.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-arguments.src 1`] = ` Object { "body": Array [ Object { @@ -4825,7 +4825,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-param-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-eval.src 1`] = ` Object { "body": Array [ Object { @@ -5161,7 +5161,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-strict-param-names.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-strict-param-names.src 1`] = ` Object { "body": Array [ Object { @@ -5497,7 +5497,7 @@ Object { } `; -exports[`ecma-features 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 { @@ -5743,7 +5743,7 @@ Object { } `; -exports[`ecma-features 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 { @@ -5989,7 +5989,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-two-lines.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/error-two-lines.src 1`] = ` Object { "body": Array [ Object { @@ -6254,9 +6254,9 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/error-wrapped-param.src 1`] = `"';' expected."`; +exports[`javascript fixtures/arrowFunctions/error-wrapped-param.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/arrowFunctions/expression.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/expression.src 1`] = ` Object { "body": Array [ Object { @@ -6465,7 +6465,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/iife.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/iife.src 1`] = ` Object { "body": Array [ Object { @@ -6805,7 +6805,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/multiple-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/multiple-params.src 1`] = ` Object { "body": Array [ Object { @@ -7069,7 +7069,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/no-auto-return.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/no-auto-return.src 1`] = ` Object { "body": Array [ Object { @@ -7423,7 +7423,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/not-strict-arguments.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-arguments.src 1`] = ` Object { "body": Array [ Object { @@ -7597,7 +7597,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/not-strict-eval.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-eval.src 1`] = ` Object { "body": Array [ Object { @@ -7771,7 +7771,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/not-strict-eval-params.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-eval-params.src 1`] = ` Object { "body": Array [ Object { @@ -8035,7 +8035,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/not-strict-octal.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/not-strict-octal.src 1`] = ` Object { "body": Array [ Object { @@ -8245,7 +8245,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/return-arrow-function.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/return-arrow-function.src 1`] = ` Object { "body": Array [ Object { @@ -8496,7 +8496,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/return-sequence.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/return-sequence.src 1`] = ` Object { "body": Array [ Object { @@ -9071,7 +9071,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/single-param.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param.src 1`] = ` Object { "body": Array [ Object { @@ -9245,7 +9245,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/single-param-parens.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param-parens.src 1`] = ` Object { "body": Array [ Object { @@ -9455,7 +9455,7 @@ Object { } `; -exports[`ecma-features fixtures/arrowFunctions/single-param-return-identifier.src 1`] = ` +exports[`javascript fixtures/arrowFunctions/single-param-return-identifier.src 1`] = ` Object { "body": Array [ Object { @@ -9664,9 +9664,3148 @@ Object { } `; -exports[`ecma-features fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; +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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 59, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 60, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "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/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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "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/binaryLiterals/invalid.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/binaryLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/binaryLiterals/lowercase.src 1`] = ` Object { "body": Array [ Object { @@ -9763,7 +12902,7 @@ Object { } `; -exports[`ecma-features fixtures/binaryLiterals/uppercase.src 1`] = ` +exports[`javascript fixtures/binaryLiterals/uppercase.src 1`] = ` Object { "body": Array [ Object { @@ -9860,7 +12999,7 @@ Object { } `; -exports[`ecma-features fixtures/blockBindings/const.src 1`] = ` +exports[`javascript fixtures/blockBindings/const.src 1`] = ` Object { "body": Array [ Object { @@ -10048,7 +13187,7 @@ Object { } `; -exports[`ecma-features fixtures/blockBindings/let.src 1`] = ` +exports[`javascript fixtures/blockBindings/let.src 1`] = ` Object { "body": Array [ Object { @@ -10236,7 +13375,7 @@ Object { } `; -exports[`ecma-features fixtures/blockBindings/let-in-switchcase.src 1`] = ` +exports[`javascript fixtures/blockBindings/let-in-switchcase.src 1`] = ` Object { "body": Array [ Object { @@ -10716,7 +13855,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-accessor-properties.src 1`] = ` +exports[`javascript fixtures/classes/class-accessor-properties.src 1`] = ` Object { "body": Array [ Object { @@ -11330,7 +14469,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-computed-static-method.src 1`] = ` +exports[`javascript fixtures/classes/class-computed-static-method.src 1`] = ` Object { "body": Array [ Object { @@ -11757,7 +14896,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-expression.src 1`] = ` +exports[`javascript fixtures/classes/class-expression.src 1`] = ` Object { "body": Array [ Object { @@ -11944,7 +15083,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-method-named-prototype.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-prototype.src 1`] = ` Object { "body": Array [ Object { @@ -12299,7 +15438,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-method-named-static.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-static.src 1`] = ` Object { "body": Array [ Object { @@ -12672,7 +15811,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-method-named-with-space.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-with-space.src 1`] = ` Object { "body": Array [ Object { @@ -12992,7 +16131,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-one-method.src 1`] = ` +exports[`javascript fixtures/classes/class-one-method.src 1`] = ` Object { "body": Array [ Object { @@ -13347,7 +16486,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-one-method-super.src 1`] = ` +exports[`javascript fixtures/classes/class-one-method-super.src 1`] = ` Object { "body": Array [ Object { @@ -13827,7 +16966,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-static-method.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method.src 1`] = ` Object { "body": Array [ Object { @@ -14218,7 +17357,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-static-method-named-prototype.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method-named-prototype.src 1`] = ` Object { "body": Array [ Object { @@ -14628,7 +17767,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-static-method-named-static.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method-named-static.src 1`] = ` Object { "body": Array [ Object { @@ -15019,7 +18158,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-static-methods-and-accessor-properties.src 1`] = ` +exports[`javascript fixtures/classes/class-static-methods-and-accessor-properties.src 1`] = ` Object { "body": Array [ Object { @@ -15837,7 +18976,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-computed-static-methods.src 1`] = ` +exports[`javascript fixtures/classes/class-two-computed-static-methods.src 1`] = ` Object { "body": Array [ Object { @@ -16486,7 +19625,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-methods.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods.src 1`] = ` Object { "body": Array [ Object { @@ -17009,7 +20148,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -17570,7 +20709,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-methods-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-semi.src 1`] = ` Object { "body": Array [ Object { @@ -18111,7 +21250,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-methods-three-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-three-semi.src 1`] = ` Object { "body": Array [ Object { @@ -18688,7 +21827,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-methods-two-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-two-semi.src 1`] = ` Object { "body": Array [ Object { @@ -19247,7 +22386,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-two-static-methods-named-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-two-static-methods-named-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -19806,7 +22945,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-with-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-with-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -20161,7 +23300,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-with-constructor-parameters.src 1`] = ` +exports[`javascript fixtures/classes/class-with-constructor-parameters.src 1`] = ` Object { "body": Array [ Object { @@ -20572,7 +23711,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/class-with-constructor-with-space.src 1`] = ` +exports[`javascript fixtures/classes/class-with-constructor-with-space.src 1`] = ` Object { "body": Array [ Object { @@ -20927,7 +24066,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/derived-class-assign-to-var.src 1`] = ` +exports[`javascript fixtures/classes/derived-class-assign-to-var.src 1`] = ` Object { "body": Array [ Object { @@ -21259,7 +24398,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/derived-class-expression.src 1`] = ` +exports[`javascript fixtures/classes/derived-class-expression.src 1`] = ` Object { "body": Array [ Object { @@ -21500,7 +24639,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/empty-class.src 1`] = ` +exports[`javascript fixtures/classes/empty-class.src 1`] = ` Object { "body": Array [ Object { @@ -21686,7 +24825,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/empty-class-double-semi.src 1`] = ` +exports[`javascript fixtures/classes/empty-class-double-semi.src 1`] = ` Object { "body": Array [ Object { @@ -21872,7 +25011,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/empty-class-semi.src 1`] = ` +exports[`javascript fixtures/classes/empty-class-semi.src 1`] = ` Object { "body": Array [ Object { @@ -22076,7 +25215,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/empty-literal-derived-class.src 1`] = ` +exports[`javascript fixtures/classes/empty-literal-derived-class.src 1`] = ` Object { "body": Array [ Object { @@ -22316,7 +25455,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/invalid-class-declaration.src 1`] = ` +exports[`javascript fixtures/classes/invalid-class-declaration.src 1`] = ` Object { "body": Array [ Object { @@ -22467,7 +25606,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/invalid-class-setter-declaration.src 1`] = ` +exports[`javascript fixtures/classes/invalid-class-setter-declaration.src 1`] = ` Object { "body": Array [ Object { @@ -22840,9 +25979,9 @@ Object { } `; -exports[`ecma-features fixtures/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; +exports[`javascript fixtures/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; -exports[`ecma-features fixtures/classes/named-class-expression.src 1`] = ` +exports[`javascript fixtures/classes/named-class-expression.src 1`] = ` Object { "body": Array [ Object { @@ -23064,7 +26203,7 @@ Object { } `; -exports[`ecma-features fixtures/classes/named-derived-class-expression.src 1`] = ` +exports[`javascript fixtures/classes/named-derived-class-expression.src 1`] = ` Object { "body": Array [ Object { @@ -23340,7 +26479,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/defaultParams/class-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -23769,7 +26908,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/class-method.src 1`] = ` +exports[`javascript fixtures/defaultParams/class-method.src 1`] = ` Object { "body": Array [ Object { @@ -24198,7 +27337,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/declaration.src 1`] = ` +exports[`javascript fixtures/defaultParams/declaration.src 1`] = ` Object { "body": Array [ Object { @@ -24497,7 +27636,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/expression.src 1`] = ` +exports[`javascript fixtures/defaultParams/expression.src 1`] = ` Object { "body": Array [ Object { @@ -24850,7 +27989,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/method.src 1`] = ` +exports[`javascript fixtures/defaultParams/method.src 1`] = ` Object { "body": Array [ Object { @@ -25333,7 +28472,7 @@ Object { } `; -exports[`ecma-features fixtures/defaultParams/not-all-params.src 1`] = ` +exports[`javascript fixtures/defaultParams/not-all-params.src 1`] = ` Object { "body": Array [ Object { @@ -25832,7 +28971,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/array-member.src 1`] = ` +exports[`javascript fixtures/destructuring/array-member.src 1`] = ` Object { "body": Array [ Object { @@ -26128,7 +29267,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/array-to-array.src 1`] = ` +exports[`javascript fixtures/destructuring/array-to-array.src 1`] = ` Object { "body": Array [ Object { @@ -26514,7 +29653,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/array-var-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring/array-var-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -26775,7 +29914,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-constructor-params-array.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-array.src 1`] = ` Object { "body": Array [ Object { @@ -27241,7 +30380,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` Object { "body": Array [ Object { @@ -27851,7 +30990,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-constructor-params-defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-object.src 1`] = ` Object { "body": Array [ Object { @@ -28539,7 +31678,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-constructor-params-object.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-object.src 1`] = ` Object { "body": Array [ Object { @@ -29083,7 +32222,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-method-params-array.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-array.src 1`] = ` Object { "body": Array [ Object { @@ -29549,7 +32688,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` Object { "body": Array [ Object { @@ -30159,7 +33298,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-method-params-defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-defaults-object.src 1`] = ` Object { "body": Array [ Object { @@ -30847,7 +33986,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/class-method-params-object.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-object.src 1`] = ` Object { "body": Array [ Object { @@ -31391,7 +34530,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array.src 1`] = ` Object { "body": Array [ Object { @@ -31668,7 +34807,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-all.src 1`] = ` Object { "body": Array [ Object { @@ -32235,7 +35374,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` Object { "body": Array [ Object { @@ -33013,7 +36152,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-multi.src 1`] = ` Object { "body": Array [ Object { @@ -33436,7 +36575,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-nested-all.src 1`] = ` Object { "body": Array [ Object { @@ -33932,7 +37071,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` Object { "body": Array [ Object { @@ -34356,7 +37495,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object.src 1`] = ` Object { "body": Array [ Object { @@ -34692,7 +37831,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-all.src 1`] = ` Object { "body": Array [ Object { @@ -35376,7 +38515,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-longform.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform.src 1`] = ` Object { "body": Array [ Object { @@ -35766,7 +38905,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-longform-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform-all.src 1`] = ` Object { "body": Array [ Object { @@ -36558,7 +39697,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` Object { "body": Array [ Object { @@ -37206,7 +40345,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-mixed-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-mixed-multi.src 1`] = ` Object { "body": Array [ Object { @@ -37782,7 +40921,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-multi.src 1`] = ` Object { "body": Array [ Object { @@ -38322,7 +41461,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-nested-all.src 1`] = ` Object { "body": Array [ Object { @@ -38971,7 +42110,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` Object { "body": Array [ Object { @@ -39548,7 +42687,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/destructured-array-catch.src 1`] = ` +exports[`javascript fixtures/destructuring/destructured-array-catch.src 1`] = ` Object { "body": Array [ Object { @@ -40469,7 +43608,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/destructured-object-catch.src 1`] = ` +exports[`javascript fixtures/destructuring/destructured-object-catch.src 1`] = ` Object { "body": Array [ Object { @@ -41429,7 +44568,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` +exports[`javascript fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` Object { "body": Array [ Object { @@ -41964,7 +45103,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/named-param.src 1`] = ` +exports[`javascript fixtures/destructuring/named-param.src 1`] = ` Object { "body": Array [ Object { @@ -42298,7 +45437,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/nested-array.src 1`] = ` +exports[`javascript fixtures/destructuring/nested-array.src 1`] = ` Object { "body": Array [ Object { @@ -42964,7 +46103,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/nested-object.src 1`] = ` +exports[`javascript fixtures/destructuring/nested-object.src 1`] = ` Object { "body": Array [ Object { @@ -43932,7 +47071,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/object-var-named.src 1`] = ` +exports[`javascript fixtures/destructuring/object-var-named.src 1`] = ` Object { "body": Array [ Object { @@ -44268,7 +47407,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/object-var-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring/object-var-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -44568,7 +47707,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/param-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-array.src 1`] = ` Object { "body": Array [ Object { @@ -44922,7 +48061,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/param-defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-object.src 1`] = ` Object { "body": Array [ Object { @@ -45315,7 +48454,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/param-defaults-object-nested.src 1`] = ` +exports[`javascript fixtures/destructuring/param-defaults-object-nested.src 1`] = ` Object { "body": Array [ Object { @@ -46038,7 +49177,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-array.src 1`] = ` +exports[`javascript fixtures/destructuring/params-array.src 1`] = ` Object { "body": Array [ Object { @@ -46409,7 +49548,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-array-wrapped.src 1`] = ` +exports[`javascript fixtures/destructuring/params-array-wrapped.src 1`] = ` Object { "body": Array [ Object { @@ -46816,7 +49955,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-multi-object.src 1`] = ` +exports[`javascript fixtures/destructuring/params-multi-object.src 1`] = ` Object { "body": Array [ Object { @@ -47226,7 +50365,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-nested-array.src 1`] = ` +exports[`javascript fixtures/destructuring/params-nested-array.src 1`] = ` Object { "body": Array [ Object { @@ -47690,7 +50829,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-nested-object.src 1`] = ` +exports[`javascript fixtures/destructuring/params-nested-object.src 1`] = ` Object { "body": Array [ Object { @@ -48341,7 +51480,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-object.src 1`] = ` +exports[`javascript fixtures/destructuring/params-object.src 1`] = ` Object { "body": Array [ Object { @@ -48790,7 +51929,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/params-object-wrapped.src 1`] = ` +exports[`javascript fixtures/destructuring/params-object-wrapped.src 1`] = ` Object { "body": Array [ Object { @@ -49275,7 +52414,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring/sparse-array.src 1`] = ` +exports[`javascript fixtures/destructuring/sparse-array.src 1`] = ` Object { "body": Array [ Object { @@ -49571,7 +52710,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` Object { "body": Array [ Object { @@ -49835,7 +52974,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` Object { "body": Array [ Object { @@ -50208,7 +53347,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` Object { "body": Array [ Object { @@ -50734,7 +53873,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` Object { "body": Array [ Object { @@ -51332,7 +54471,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` Object { "body": Array [ Object { @@ -51635,7 +54774,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` Object { "body": Array [ Object { @@ -51953,7 +55092,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` Object { "body": Array [ Object { @@ -52310,7 +55449,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` Object { "body": Array [ Object { @@ -53071,7 +56210,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -53332,7 +56471,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -53593,7 +56732,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/object-const-named.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-named.src 1`] = ` Object { "body": Array [ Object { @@ -53929,7 +57068,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/object-const-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -54229,7 +57368,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` Object { "body": Array [ Object { @@ -54565,7 +57704,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-blockBindings/object-let-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-undefined.src 1`] = ` Object { "body": Array [ Object { @@ -54865,7 +58004,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` Object { "body": Array [ Object { @@ -55309,7 +58448,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-defaultParams/param-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object.src 1`] = ` Object { "body": Array [ Object { @@ -55904,7 +59043,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` Object { "body": Array [ Object { @@ -56557,7 +59696,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-forOf/loop.src 1`] = ` +exports[`javascript fixtures/destructuring-and-forOf/loop.src 1`] = ` Object { "body": Array [ Object { @@ -56834,7 +59973,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -57333,7 +60472,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { @@ -57754,7 +60893,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` Object { "body": Array [ Object { @@ -58269,7 +61408,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` Object { "body": Array [ Object { @@ -58768,7 +61907,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -59080,7 +62219,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/single-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/single-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -59338,7 +62477,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -59857,7 +62996,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { @@ -60298,7 +63437,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/var-multi-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-multi-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -60630,7 +63769,7 @@ Object { } `; -exports[`ecma-features fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -60908,7 +64047,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalAsyncIteration/async-generators.src 1`] = ` +exports[`javascript fixtures/experimentalAsyncIteration/async-generators.src 1`] = ` Object { "body": Array [ Object { @@ -61134,7 +64273,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalAsyncIteration/async-iterator.src 1`] = ` +exports[`javascript fixtures/experimentalAsyncIteration/async-iterator.src 1`] = ` Object { "body": Array [ Object { @@ -61633,7 +64772,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` +exports[`javascript fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` Object { "body": Array [ Object { @@ -61983,7 +65122,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` Object { "body": Array [ Object { @@ -62393,7 +65532,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` Object { "body": Array [ Object { @@ -62945,7 +66084,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` Object { "body": Array [ Object { @@ -63262,9 +66401,9 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; -exports[`ecma-features fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` Object { "body": Array [ Object { @@ -63746,7 +66885,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` Object { "body": Array [ Object { @@ -64731,7 +67870,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` Object { "body": Array [ Object { @@ -65593,7 +68732,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` Object { "body": Array [ Object { @@ -66226,7 +69365,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` Object { "body": Array [ Object { @@ -66915,7 +70054,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { @@ -67633,7 +70772,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` Object { "body": Array [ Object { @@ -68423,7 +71562,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` Object { "body": Array [ Object { @@ -68831,7 +71970,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` Object { "body": Array [ Object { @@ -69581,7 +72720,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` Object { "body": Array [ Object { @@ -69786,7 +72925,7 @@ Object { } `; -exports[`ecma-features fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` Object { "body": Array [ Object { @@ -70062,7 +73201,7 @@ Object { } `; -exports[`ecma-features fixtures/exponentiationOperators/exponential-operators.src 1`] = ` +exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` Object { "body": Array [ Object { @@ -70468,7 +73607,7 @@ Object { } `; -exports[`ecma-features fixtures/forOf/for-of-with-function-initializer.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` Object { "body": Array [ Object { @@ -71183,7 +74322,7 @@ Object { } `; -exports[`ecma-features fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` Object { "body": Array [ Object { @@ -71606,7 +74745,7 @@ Object { } `; -exports[`ecma-features fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` Object { "body": Array [ Object { @@ -71974,7 +75113,7 @@ Object { } `; -exports[`ecma-features fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` Object { "body": Array [ Object { @@ -72342,7 +75481,7 @@ Object { } `; -exports[`ecma-features fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` +exports[`javascript fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` Object { "body": Array [ Object { @@ -72710,7 +75849,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/anonymous-generator.src 1`] = ` +exports[`javascript fixtures/generators/anonymous-generator.src 1`] = ` Object { "body": Array [ Object { @@ -73044,7 +76183,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/async-generator-function.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-function.src 1`] = ` Object { "body": Array [ Object { @@ -73270,7 +76409,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/async-generator-method.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-method.src 1`] = ` Object { "body": Array [ Object { @@ -73898,7 +77037,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/double-yield.src 1`] = ` +exports[`javascript fixtures/generators/double-yield.src 1`] = ` Object { "body": Array [ Object { @@ -74269,7 +77408,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/empty-generator-declaration.src 1`] = ` +exports[`javascript fixtures/generators/empty-generator-declaration.src 1`] = ` Object { "body": Array [ Object { @@ -74512,7 +77651,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/generator-declaration.src 1`] = ` +exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` Object { "body": Array [ Object { @@ -74863,7 +78002,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/yield-delegation.src 1`] = ` +exports[`javascript fixtures/generators/yield-delegation.src 1`] = ` Object { "body": Array [ Object { @@ -75215,7 +78354,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/yield-without-value.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value.src 1`] = ` Object { "body": Array [ Object { @@ -75532,7 +78671,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/yield-without-value-in-call.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-in-call.src 1`] = ` Object { "body": Array [ Object { @@ -75940,7 +79079,7 @@ Object { } `; -exports[`ecma-features fixtures/generators/yield-without-value-no-semi.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-no-semi.src 1`] = ` Object { "body": Array [ Object { @@ -76239,7 +79378,7 @@ Object { } `; -exports[`ecma-features fixtures/globalReturn/return-identifier.src 1`] = ` +exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` Object { "body": Array [ Object { @@ -76353,7 +79492,7 @@ Object { } `; -exports[`ecma-features fixtures/globalReturn/return-no-arg.src 1`] = ` +exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` Object { "body": Array [ Object { @@ -76432,7 +79571,7 @@ Object { } `; -exports[`ecma-features fixtures/globalReturn/return-true.src 1`] = ` +exports[`javascript fixtures/globalReturn/return-true.src 1`] = ` Object { "body": Array [ Object { @@ -76547,7 +79686,7 @@ Object { } `; -exports[`ecma-features fixtures/importMeta/simple-import-meta.src 1`] = ` +exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` Object { "body": Array [ Object { @@ -76786,7 +79925,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/error-delete.src 1`] = ` +exports[`javascript fixtures/modules/error-delete.src 1`] = ` Object { "body": Array [ Object { @@ -77082,7 +80221,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/error-function.src 1`] = ` +exports[`javascript fixtures/modules/error-function.src 1`] = ` Object { "body": Array [ Object { @@ -77380,7 +80519,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/error-strict.src 1`] = ` +exports[`javascript fixtures/modules/error-strict.src 1`] = ` Object { "body": Array [ Object { @@ -77964,7 +81103,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-array.src 1`] = ` +exports[`javascript fixtures/modules/export-default-array.src 1`] = ` Object { "body": Array [ Object { @@ -78114,7 +81253,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-class.src 1`] = ` +exports[`javascript fixtures/modules/export-default-class.src 1`] = ` Object { "body": Array [ Object { @@ -78283,7 +81422,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-expression.src 1`] = ` +exports[`javascript fixtures/modules/export-default-expression.src 1`] = ` Object { "body": Array [ Object { @@ -78525,7 +81664,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-function.src 1`] = ` +exports[`javascript fixtures/modules/export-default-function.src 1`] = ` Object { "body": Array [ Object { @@ -78733,7 +81872,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-named-class.src 1`] = ` +exports[`javascript fixtures/modules/export-default-named-class.src 1`] = ` Object { "body": Array [ Object { @@ -78937,7 +82076,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-named-function.src 1`] = ` +exports[`javascript fixtures/modules/export-default-named-function.src 1`] = ` Object { "body": Array [ Object { @@ -79180,7 +82319,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-number.src 1`] = ` +exports[`javascript fixtures/modules/export-default-number.src 1`] = ` Object { "body": Array [ Object { @@ -79313,7 +82452,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-object.src 1`] = ` +exports[`javascript fixtures/modules/export-default-object.src 1`] = ` Object { "body": Array [ Object { @@ -79576,7 +82715,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-default-value.src 1`] = ` +exports[`javascript fixtures/modules/export-default-value.src 1`] = ` Object { "body": Array [ Object { @@ -79708,7 +82847,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-batch.src 1`] = ` +exports[`javascript fixtures/modules/export-from-batch.src 1`] = ` Object { "body": Array [ Object { @@ -79859,7 +82998,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-default.src 1`] = ` +exports[`javascript fixtures/modules/export-from-default.src 1`] = ` Object { "body": Array [ Object { @@ -80102,7 +83241,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-default.src 1`] = ` Object { "body": Array [ Object { @@ -80381,7 +83520,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -80660,7 +83799,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -81028,7 +84167,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -81271,7 +84410,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-from-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -81603,7 +84742,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-function.src 1`] = ` +exports[`javascript fixtures/modules/export-function.src 1`] = ` Object { "body": Array [ Object { @@ -81830,7 +84969,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-default.src 1`] = ` Object { "body": Array [ Object { @@ -82055,7 +85194,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -82280,7 +85419,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -82594,7 +85733,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-class.src 1`] = ` +exports[`javascript fixtures/modules/export-named-class.src 1`] = ` Object { "body": Array [ Object { @@ -82782,7 +85921,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-empty.src 1`] = ` +exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` Object { "body": Array [ Object { @@ -82899,7 +86038,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -83088,7 +86227,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -83366,7 +86505,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { @@ -83662,7 +86801,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-var.src 1`] = ` +exports[`javascript fixtures/modules/export-var.src 1`] = ` Object { "body": Array [ Object { @@ -83834,7 +86973,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-var-anonymous-function.src 1`] = ` +exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` Object { "body": Array [ Object { @@ -84153,7 +87292,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/export-var-number.src 1`] = ` +exports[`javascript fixtures/modules/export-var-number.src 1`] = ` Object { "body": Array [ Object { @@ -84379,7 +87518,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-default.src 1`] = ` +exports[`javascript fixtures/modules/import-default.src 1`] = ` Object { "body": Array [ Object { @@ -84567,7 +87706,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-default-and-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -84880,7 +88019,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -85175,7 +88314,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-default-as.src 1`] = ` +exports[`javascript fixtures/modules/import-default-as.src 1`] = ` Object { "body": Array [ Object { @@ -85453,7 +88592,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-jquery.src 1`] = ` +exports[`javascript fixtures/modules/import-jquery.src 1`] = ` Object { "body": Array [ Object { @@ -85623,7 +88762,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-module.src 1`] = ` +exports[`javascript fixtures/modules/import-module.src 1`] = ` Object { "body": Array [ Object { @@ -85739,7 +88878,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -86017,7 +89156,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -86384,7 +89523,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-empty.src 1`] = ` +exports[`javascript fixtures/modules/import-named-empty.src 1`] = ` Object { "body": Array [ Object { @@ -86554,7 +89693,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -86796,7 +89935,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -87127,7 +90266,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { @@ -87476,7 +90615,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-namespace-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -87700,7 +90839,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/import-null-as-nil.src 1`] = ` +exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` Object { "body": Array [ Object { @@ -87960,7 +91099,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-await.src 1`] = ` +exports[`javascript fixtures/modules/invalid-await.src 1`] = ` Object { "body": Array [ Object { @@ -88132,7 +91271,7 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-class.src 1`] = ` +exports[`javascript fixtures/modules/invalid-class.src 1`] = ` Object { "body": Array [ Object { @@ -88301,17 +91440,17 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; +exports[`javascript fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; +exports[`javascript fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/modules/invalid-export-named-default.src 1`] = ` +exports[`javascript fixtures/modules/invalid-export-named-default.src 1`] = ` Object { "body": Array [ Object { @@ -88482,19 +91621,19 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; +exports[`javascript fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; -exports[`ecma-features fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; +exports[`javascript fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; -exports[`ecma-features fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; +exports[`javascript fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -88681,9 +91820,9 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-module-specifier.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-module-specifier.src 1`] = ` Object { "body": Array [ Object { @@ -88907,21 +92046,21 @@ Object { } `; -exports[`ecma-features fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; +exports[`javascript fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; -exports[`ecma-features fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; +exports[`javascript fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; -exports[`ecma-features fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; +exports[`javascript fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; -exports[`ecma-features fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; +exports[`javascript fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; -exports[`ecma-features fixtures/newTarget/invalid-new-target.src 1`] = ` +exports[`javascript fixtures/newTarget/invalid-new-target.src 1`] = ` Object { "body": Array [ Object { @@ -89180,7 +92319,7 @@ Object { } `; -exports[`ecma-features fixtures/newTarget/invalid-unknown-property.src 1`] = ` +exports[`javascript fixtures/newTarget/invalid-unknown-property.src 1`] = ` Object { "body": Array [ Object { @@ -89587,7 +92726,7 @@ Object { } `; -exports[`ecma-features fixtures/newTarget/simple-new-target.src 1`] = ` +exports[`javascript fixtures/newTarget/simple-new-target.src 1`] = ` Object { "body": Array [ Object { @@ -90012,7 +93151,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` +exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` Object { "body": Array [ Object { @@ -90361,7 +93500,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` Object { "body": Array [ Object { @@ -90789,7 +93928,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` Object { "body": Array [ Object { @@ -91218,7 +94357,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` Object { "body": Array [ Object { @@ -91870,7 +95009,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` Object { "body": Array [ Object { @@ -92225,7 +95364,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` Object { "body": Array [ Object { @@ -92579,11 +95718,11 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; -exports[`ecma-features fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; -exports[`ecma-features fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` Object { "body": Array [ Object { @@ -92882,7 +96021,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` Object { "body": Array [ Object { @@ -93255,7 +96394,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` Object { "body": Array [ Object { @@ -93647,7 +96786,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` Object { "body": Array [ Object { @@ -94347,7 +97486,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` Object { "body": Array [ Object { @@ -95049,7 +98188,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` Object { "body": Array [ Object { @@ -95570,7 +98709,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` Object { "body": Array [ Object { @@ -96093,9 +99232,9 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; +exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` Object { "body": Array [ Object { @@ -96561,7 +99700,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` Object { "body": Array [ Object { @@ -96952,7 +100091,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` Object { "body": Array [ Object { @@ -97343,7 +100482,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` Object { "body": Array [ Object { @@ -97734,7 +100873,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` Object { "body": Array [ Object { @@ -98162,7 +101301,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` Object { "body": Array [ Object { @@ -98554,7 +101693,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` Object { "body": Array [ Object { @@ -99021,7 +102160,7 @@ Object { } `; -exports[`ecma-features fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { @@ -99743,9 +102882,9 @@ Object { } `; -exports[`ecma-features fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; +exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; -exports[`ecma-features fixtures/octalLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/octalLiterals/lowercase.src 1`] = ` Object { "body": Array [ Object { @@ -99842,7 +102981,7 @@ Object { } `; -exports[`ecma-features fixtures/octalLiterals/strict-uppercase.src 1`] = ` +exports[`javascript fixtures/octalLiterals/strict-uppercase.src 1`] = ` Object { "body": Array [ Object { @@ -100011,7 +103150,7 @@ Object { } `; -exports[`ecma-features fixtures/octalLiterals/uppercase.src 1`] = ` +exports[`javascript fixtures/octalLiterals/uppercase.src 1`] = ` Object { "body": Array [ Object { @@ -100108,7 +103247,7 @@ Object { } `; -exports[`ecma-features fixtures/regex/regexp-simple.src 1`] = ` +exports[`javascript fixtures/regex/regexp-simple.src 1`] = ` Object { "body": Array [ Object { @@ -100305,7 +103444,7 @@ Object { } `; -exports[`ecma-features fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` Object { "body": Array [ Object { @@ -100502,7 +103641,7 @@ Object { } `; -exports[`ecma-features fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` Object { "body": Array [ Object { @@ -100699,7 +103838,7 @@ Object { } `; -exports[`ecma-features fixtures/regexUFlag/regex-u-simple.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-simple.src 1`] = ` Object { "body": Array [ Object { @@ -100896,7 +104035,7 @@ Object { } `; -exports[`ecma-features fixtures/regexYFlag/regexp-y-simple.src 1`] = ` +exports[`javascript fixtures/regexYFlag/regexp-y-simple.src 1`] = ` Object { "body": Array [ Object { @@ -101093,7 +104232,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/basic-rest.src 1`] = ` +exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` Object { "body": Array [ Object { @@ -101444,7 +104583,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/restParams/class-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -101836,7 +104975,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/class-method.src 1`] = ` +exports[`javascript fixtures/restParams/class-method.src 1`] = ` Object { "body": Array [ Object { @@ -102228,7 +105367,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/error-no-default.src 1`] = ` +exports[`javascript fixtures/restParams/error-no-default.src 1`] = ` Object { "body": Array [ Object { @@ -102545,7 +105684,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/error-not-last.src 1`] = ` +exports[`javascript fixtures/restParams/error-not-last.src 1`] = ` Object { "body": Array [ Object { @@ -102880,7 +106019,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/func-expression.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression.src 1`] = ` Object { "body": Array [ Object { @@ -103234,7 +106373,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/func-expression-multi.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression-multi.src 1`] = ` Object { "body": Array [ Object { @@ -103642,7 +106781,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/invalid-rest-param.src 1`] = ` +exports[`javascript fixtures/restParams/invalid-rest-param.src 1`] = ` Object { "body": Array [ Object { @@ -104033,7 +107172,7 @@ Object { } `; -exports[`ecma-features fixtures/restParams/single-rest.src 1`] = ` +exports[`javascript fixtures/restParams/single-rest.src 1`] = ` Object { "body": Array [ Object { @@ -104330,11 +107469,11 @@ Object { } `; -exports[`ecma-features fixtures/spread/error-invalid-if.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/spread/error-invalid-if.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/spread/error-invalid-sequence.src 1`] = `"Expression expected."`; +exports[`javascript fixtures/spread/error-invalid-sequence.src 1`] = `"Expression expected."`; -exports[`ecma-features fixtures/spread/multi-function-call.src 1`] = ` +exports[`javascript fixtures/spread/multi-function-call.src 1`] = ` Object { "body": Array [ Object { @@ -104610,7 +107749,7 @@ Object { } `; -exports[`ecma-features fixtures/spread/not-final-param.src 1`] = ` +exports[`javascript fixtures/spread/not-final-param.src 1`] = ` Object { "body": Array [ Object { @@ -104886,7 +108025,7 @@ Object { } `; -exports[`ecma-features fixtures/spread/simple-function-call.src 1`] = ` +exports[`javascript fixtures/spread/simple-function-call.src 1`] = ` Object { "body": Array [ Object { @@ -105108,7 +108247,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/deeply-nested.src 1`] = ` +exports[`javascript fixtures/templateStrings/deeply-nested.src 1`] = ` Object { "body": Array [ Object { @@ -105573,7 +108712,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/error-octal-literal.src 1`] = ` +exports[`javascript fixtures/templateStrings/error-octal-literal.src 1`] = ` Object { "body": Array [ Object { @@ -105693,7 +108832,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/escape-characters.src 1`] = ` +exports[`javascript fixtures/templateStrings/escape-characters.src 1`] = ` Object { "body": Array [ Object { @@ -105907,7 +109046,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/expressions.src 1`] = ` +exports[`javascript fixtures/templateStrings/expressions.src 1`] = ` Object { "body": Array [ Object { @@ -106581,7 +109720,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/multi-line-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/multi-line-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -106716,7 +109855,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/simple-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/simple-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -106836,7 +109975,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/single-dollar-sign.src 1`] = ` +exports[`javascript fixtures/templateStrings/single-dollar-sign.src 1`] = ` Object { "body": Array [ Object { @@ -107048,7 +110187,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/tagged-no-placeholders.src 1`] = ` +exports[`javascript fixtures/templateStrings/tagged-no-placeholders.src 1`] = ` Object { "body": Array [ Object { @@ -107221,7 +110360,7 @@ Object { } `; -exports[`ecma-features fixtures/templateStrings/tagged-template-string.src 1`] = ` +exports[`javascript fixtures/templateStrings/tagged-template-string.src 1`] = ` Object { "body": Array [ Object { @@ -107947,7 +111086,7 @@ Object { } `; -exports[`ecma-features fixtures/unicodeCodePointEscapes/basic-string-literal.src 1`] = ` +exports[`javascript fixtures/unicodeCodePointEscapes/basic-string-literal.src 1`] = ` Object { "body": Array [ Object { @@ -108044,7 +111183,7 @@ Object { } `; -exports[`ecma-features fixtures/unicodeCodePointEscapes/complex-string-literal.src 1`] = ` +exports[`javascript fixtures/unicodeCodePointEscapes/complex-string-literal.src 1`] = ` Object { "body": Array [ Object { @@ -108141,6 +111280,6 @@ Object { } `; -exports[`ecma-features fixtures/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = `"Hexadecimal digit expected."`; +exports[`javascript fixtures/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = `"Hexadecimal digit expected."`; -exports[`ecma-features 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/tests/lib/__snapshots__/semanticInfo.ts.snap b/tests/lib/__snapshots__/semanticInfo.ts.snap new file mode 100644 index 0000000..5af1b41 --- /dev/null +++ b/tests/lib/__snapshots__/semanticInfo.ts.snap @@ -0,0 +1,1136 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`semanticInfo fixtures/export-file.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + ], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 24, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "ExportDefaultDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "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": "default", + }, + 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": "Numeric", + "value": "3", + }, + 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": "Numeric", + "value": "4", + }, + 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": "Numeric", + "value": "5", + }, + 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[`semanticInfo fixtures/import-file.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": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 35, + ], + "raw": "\\"./export-file.src\\"", + "type": "Literal", + "value": "./export-file.src", + }, + "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": "arr", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", + }, + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "raw": "6", + "type": "Literal", + "value": 6, + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "raw": "7", + "type": "Literal", + "value": 7, + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "arr", + "range": Array [ + 37, + 40, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "push", + "range": Array [ + 41, + 45, + ], + "type": "Identifier", + }, + "range": Array [ + 37, + 45, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 37, + 51, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 37, + 52, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "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": "arr", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 35, + ], + "type": "String", + "value": "\\"./export-file.src\\"", + }, + 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": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 37, + 40, + ], + "type": "Identifier", + "value": "arr", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "Identifier", + "value": "push", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Numeric", + "value": "6", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Numeric", + "value": "7", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`semanticInfo fixtures/isolated-file.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": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + 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, + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 19, + ], + "type": "ArrayExpression", + }, + "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": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "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": 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": "Numeric", + "value": "3", + }, + 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": "Numeric", + "value": "4", + }, + 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": "5", + }, + 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[`semanticInfo malformed project file 1`] = `"Compiler option 'compileOnSave' requires a value of type boolean."`; diff --git a/tests/lib/basics.ts b/tests/lib/basics.ts deleted file mode 100644 index 364d3bb..0000000 --- a/tests/lib/basics.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @fileoverview Tests for basic expressions - * @author Nicholas C. Zakas - * @author James Henry - * @copyright jQuery Foundation and other contributors, https://jquery.org/ - * MIT License - */ -import path from 'path'; -import shelljs from 'shelljs'; -import { ParserOptions } from '../../src/temp-types-based-on-js-source'; -import { createSnapshotTestBlock } from '../../tools/test-utils'; - -//------------------------------------------------------------------------------ -// Setup -//------------------------------------------------------------------------------ - -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) - ); - -//------------------------------------------------------------------------------ -// Tests -//------------------------------------------------------------------------------ - -describe('basics', () => { - testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`); - const config = { - loc: true, - range: true, - tokens: true, - errorOnUnknownASTType: true - }; - it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) - ); - }); -}); diff --git a/tests/lib/ecma-features.ts b/tests/lib/javascript.ts similarity index 93% rename from tests/lib/ecma-features.ts rename to tests/lib/javascript.ts index e2a3b98..6635ae7 100644 --- a/tests/lib/ecma-features.ts +++ b/tests/lib/javascript.ts @@ -14,7 +14,7 @@ import { createSnapshotTestBlock } from '../../tools/test-utils'; // Setup //------------------------------------------------------------------------------ -const FIXTURES_DIR = './tests/fixtures/ecma-features'; +const FIXTURES_DIR = './tests/fixtures/javascript'; const testFiles = shelljs .find(FIXTURES_DIR) @@ -28,7 +28,7 @@ const testFiles = shelljs // Tests //------------------------------------------------------------------------------ -describe('ecma-features', () => { +describe('javascript', () => { testFiles.forEach(filename => { const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`), config = { diff --git a/tests/lib/semanticInfo.ts b/tests/lib/semanticInfo.ts new file mode 100644 index 0000000..d0c1f37 --- /dev/null +++ b/tests/lib/semanticInfo.ts @@ -0,0 +1,196 @@ +/** + * @fileoverview Tests for semantic information + * @author Benjamin Lichtman + */ + +'use strict'; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import path from 'path'; +import shelljs from 'shelljs'; +import { + parseCodeAndGenerateServices, + createSnapshotTestBlock +} from '../../tools/test-utils'; +import ts from 'typescript'; +import { ParserOptions } from '../../src/temp-types-based-on-js-source'; + +//------------------------------------------------------------------------------ +// 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) + ); + +function createOptions(fileName: string): ParserOptions & { cwd?: string } { + return { + loc: true, + range: true, + tokens: true, + comment: true, + jsx: false, + useJSXTextNode: false, + errorOnUnknownASTType: true, + filePath: fileName, + tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), + project: './tsconfig.json', + loggerFn: false + }; +} + +//------------------------------------------------------------------------------ +// Tests +//------------------------------------------------------------------------------ + +describe('semanticInfo', () => { + // test all AST snapshots + testFiles.forEach(filename => { + // Uncomment and fill in filename to focus on a single file + // var filename = "jsx/invalid-matching-placeholder-in-closing-tag"; + const fullFileName = `${path.resolve(FIXTURES_DIR, filename)}.src.ts`; + const code = shelljs.cat(fullFileName); + test( + `fixtures/${filename}.src`, + createSnapshotTestBlock( + code, + createOptions(fullFileName), + /*generateServices*/ true + ) + ); + }); + + // case-specific tests + test('isolated-file tests', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const parseResult = parseCodeAndGenerateServices( + shelljs.cat(fileName), + createOptions(fileName) + ); + + // get type checker + expect(parseResult).toHaveProperty('services.program.getTypeChecker'); + const checker = parseResult.services.program!.getTypeChecker(); + + // get number node (ast shape validated by snapshot) + const arrayMember = (parseResult.ast as any).body[0].declarations[0].init + .elements[0]; + expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + + // get corresponding TS node + const tsArrayMember = parseResult.services.esTreeNodeToTSNodeMap!.get( + arrayMember + ); + expect(tsArrayMember).toBeDefined(); + expect(tsArrayMember.kind).toBe(ts.SyntaxKind.NumericLiteral); + expect(tsArrayMember.text).toBe('3'); + + // get type of TS node + const arrayMemberType: any = checker.getTypeAtLocation(tsArrayMember); + expect(arrayMemberType.flags).toBe(ts.TypeFlags.NumberLiteral); + expect(arrayMemberType.value).toBe(3); + + // make sure it maps back to original ESTree node + expect(parseResult).toHaveProperty('services.tsNodeToESTreeNodeMap'); + expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsArrayMember)).toBe( + arrayMember + ); + + // get bound name + const boundName = (parseResult.ast as any).body[0].declarations[0].id; + expect(boundName.name).toBe('x'); + + const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap!.get( + boundName + ); + expect(tsBoundName).toBeDefined(); + + checkNumberArrayType(checker, tsBoundName); + + expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsBoundName)).toBe( + boundName + ); + }); + + test('imported-file tests', () => { + const fileName = path.resolve(FIXTURES_DIR, 'import-file.src.ts'); + const parseResult = parseCodeAndGenerateServices( + shelljs.cat(fileName), + createOptions(fileName) + ); + + // get type checker + expect(parseResult).toHaveProperty('services.program.getTypeChecker'); + const checker = parseResult.services.program!.getTypeChecker(); + + // get array node (ast shape validated by snapshot) + // node is defined in other file than the parsed one + const arrayBoundName = (parseResult.ast as any).body[1].expression.callee + .object; + expect(arrayBoundName.name).toBe('arr'); + + expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + const tsArrayBoundName = parseResult.services.esTreeNodeToTSNodeMap!.get( + arrayBoundName + ); + expect(tsArrayBoundName).toBeDefined(); + checkNumberArrayType(checker, tsArrayBoundName); + + expect( + parseResult.services.tsNodeToESTreeNodeMap!.get(tsArrayBoundName) + ).toBe(arrayBoundName); + }); + + test('non-existent project file', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const badConfig = createOptions(fileName); + badConfig.project = './tsconfigs.json'; + expect(() => + parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + ).toThrowError(/File .+tsconfigs\.json' not found/); + }); + + test('fail to read project file', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const badConfig = createOptions(fileName); + badConfig.project = '.'; + expect(() => + parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + ).toThrowError(/File .+semanticInfo' not found/); + }); + + test('malformed project file', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const badConfig = createOptions(fileName); + badConfig.project = './badTSConfig/tsconfig.json'; + expect(() => + parseCodeAndGenerateServices(shelljs.cat(fileName), badConfig) + ).toThrowErrorMatchingSnapshot(); + }); +}); + +/** + * Verifies that the type of a TS node is number[] as expected + * @param {ts.TypeChecker} checker + * @param {ts.Node} tsNode + */ +function checkNumberArrayType(checker: ts.TypeChecker, tsNode: ts.Node) { + const nodeType = checker.getTypeAtLocation(tsNode); + expect(nodeType.flags).toBe(ts.TypeFlags.Object); + expect((nodeType as ts.ObjectType).objectFlags).toBe( + ts.ObjectFlags.Reference + ); + expect((nodeType as ts.TypeReference).typeArguments).toHaveLength(1); + expect((nodeType as ts.TypeReference).typeArguments![0].flags).toBe( + ts.TypeFlags.Number + ); +} diff --git a/tools/test-utils.ts b/tools/test-utils.ts index 453a8db..d167d49 100644 --- a/tools/test-utils.ts +++ b/tools/test-utils.ts @@ -24,19 +24,32 @@ export function getRaw(ast: any) { ); } +export function parseCodeAndGenerateServices( + code: string, + config: ParserOptions +) { + return parser.parseAndGenerateServices(code, config); +} + /** * Returns a function which can be used as the callback of a Jest test() block, * and which performs an assertion on the snapshot for the given code and config. * @param {string} code The source code to parse * @param {ParserOptions} config the parser configuration - * @returns {Function} callback for Jest it() block + * @returns {jest.ProvidesCallback} callback for Jest it() block */ -export function createSnapshotTestBlock(code: string, config: ParserOptions) { +export function createSnapshotTestBlock( + code: string, + config: ParserOptions, + generateServices?: true +) { /** * @returns {Object} the AST object */ function parse() { - const ast = parser.parse(code, config); + const ast = generateServices + ? parser.parseAndGenerateServices(code, config).ast + : parser.parse(code, config); return getRaw(ast); } From ba65937fbaebbcb9f8ccaa744d01efd8387d5a08 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Mon, 26 Nov 2018 10:10:21 +0800 Subject: [PATCH 3/3] refactor: extract code for computing file name --- src/parser.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/parser.ts b/src/parser.ts index e2349da..41135b8 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -30,6 +30,15 @@ const isRunningSupportedTypeScriptVersion = semver.satisfies( let extra: Extra; let warnedAboutTSVersion = false; +/** + * Compute the filename based on the parser options + * + * @param options Parser options + */ +function getFileName({ jsx }: { jsx?: boolean }) { + return jsx ? 'estree.tsx' : 'estree.ts'; +} + /** * Resets the extra config object * @returns {void} @@ -61,12 +70,12 @@ function getASTFromProject(code: string, options: ParserOptions) { return util.firstDefined( calculateProjectParserOptions( code, - options.filePath || (options.jsx ? 'estree.ts' : 'estree.tsx'), + options.filePath || getFileName(options), extra ), (currentProgram: ts.Program) => { const ast = currentProgram.getSourceFile( - options.filePath || (options.jsx ? 'estree.ts' : 'estree.tsx') + options.filePath || getFileName(options) ); return ast && { ast, program: currentProgram }; } @@ -80,7 +89,7 @@ function getASTFromProject(code: string, options: ParserOptions) { function createNewProgram(code: string) { // Even if jsx option is set in typescript compiler, filename still has to // contain .tsx file extension - const FILENAME = extra.jsx ? 'estree.tsx' : 'estree.ts'; + const FILENAME = getFileName(extra); const compilerHost = { fileExists() {