├── .eslintignore ├── .eslintrc.cjs ├── .github └── workflows │ ├── node.js.yml │ └── release-please.yml ├── .gitignore ├── .mailmap ├── .prettierignore ├── .prettierrc ├── .release-please-manifest.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin ├── deploy-gh-pages.sh ├── es5bench ├── esprima-tests └── test-es5.cjs ├── doc ├── README.md ├── api-reference.md ├── contributor-guide.md ├── errors.md ├── extras.md ├── images │ ├── diagrams.key │ │ ├── Data │ │ │ ├── 110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg │ │ │ ├── 110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg │ │ │ ├── 110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg │ │ │ ├── mt10@2x-87.jpg │ │ │ ├── mt1@2x-78.jpg │ │ │ ├── mt2@2x-79.jpg │ │ │ ├── mt3@2x-80.jpg │ │ │ ├── mt4@2x-81.jpg │ │ │ ├── mt5@2x-82.jpg │ │ │ ├── mt6@2x-83.jpg │ │ │ ├── mt7@2x-84.jpg │ │ │ ├── mt8@2x-85.jpg │ │ │ ├── mt9@2x-86.jpg │ │ │ ├── st0-997.jpg │ │ │ └── st1-1189.jpg │ │ ├── Index.zip │ │ ├── Metadata │ │ │ ├── BuildVersionHistory.plist │ │ │ ├── DocumentIdentifier │ │ │ └── Properties.plist │ │ ├── preview-micro.jpg │ │ ├── preview-web.jpg │ │ └── preview.jpg │ ├── instantiating-grammars.png │ ├── matching.png │ ├── quick-ref-basic-syntax.png │ ├── visualizer-small.png │ └── visualizer.png ├── indentation-sensitive.md ├── patterns-and-pitfalls.md ├── philosophy.md ├── publishing-grammars.md ├── quick-reference.md ├── releases │ ├── ohm-js-16.0.md │ └── ohm-js-17.0.md ├── syntax-reference.md └── typescript.md ├── examples ├── csv │ ├── csv.ohm │ └── index.js ├── ecmascript │ ├── README.md │ ├── compile.js │ ├── index.js │ ├── package.json │ └── src │ │ ├── es5.js │ │ ├── es5.ohm │ │ ├── es5.test.mjs │ │ ├── es6.js │ │ ├── es6.ohm │ │ ├── es6.test.mjs │ │ └── testdata │ │ ├── test.es6 │ │ └── underscore-1.0.0.js ├── incremental │ ├── bench.html │ ├── index.html │ └── third_party │ │ ├── codemirror.css │ │ ├── codemirror.js │ │ ├── jquery-3.1.1.min.js │ │ └── sparklines.js ├── indentation-sensitive │ ├── .eslintrc.json │ ├── index.js │ └── package.json ├── lib.js ├── markdown │ ├── README.md │ ├── markdown.mjs │ ├── package.json │ ├── snapshots │ │ └── test │ │ │ ├── test-markdown.mjs.md │ │ │ └── test-markdown.mjs.snap │ └── test │ │ ├── data │ │ └── test.md │ │ ├── snapshots │ │ ├── test-markdown.mjs.md │ │ └── test-markdown.mjs.snap │ │ └── test-markdown.mjs ├── math │ ├── index.html │ ├── math.css │ └── parens.png ├── nl-datalog-syntax │ ├── .eslintrc.json │ ├── ast-classes.js │ ├── index.html │ └── parser.js ├── operators │ ├── .eslintrc.json │ ├── README.md │ ├── operator-example.mjs │ ├── package-lock.json │ ├── package.json │ └── test │ │ ├── .eslintrc.json │ │ └── operator-test.mjs ├── prettyPrint.mjs ├── simple-lisp │ ├── package.json │ └── src │ │ ├── simple-lisp.mjs │ │ └── simple-lisp.test.mjs ├── typescript │ ├── .gitignore │ ├── package.json │ ├── src │ │ ├── arithmetic.ohm │ │ ├── arithmetic.test.ts │ │ └── arithmetic.ts │ └── tsconfig.json └── viz │ ├── index.html │ └── viz.css ├── package.json ├── packages ├── .eslintrc.cjs ├── cli │ ├── index.js │ ├── package.json │ └── src │ │ ├── cli.js │ │ ├── cli.test.js │ │ ├── commands │ │ ├── generateBundles │ │ │ ├── index.js │ │ │ ├── index.test.js │ │ │ ├── index.test.js.md │ │ │ ├── index.test.js.snap │ │ │ └── testdata │ │ │ │ ├── arithmetic.ohm │ │ │ │ └── e │ │ │ │ └── f │ │ │ │ └── g.ohm │ │ ├── index.js │ │ └── match.js │ │ ├── helpers │ │ ├── generateTypes.d.ts │ │ ├── generateTypes.js │ │ ├── generateTypes.test.js.md │ │ ├── generateTypes.test.js.snap │ │ ├── generateTypes.test.ts │ │ └── getNodeTypes.js │ │ └── testdata │ │ ├── words-fails.txt │ │ ├── words-succeeds.txt │ │ └── words.ohm ├── es-grammars │ ├── README.md │ ├── gen │ │ ├── es2015.grammar.ohm │ │ ├── es2016.grammar.ohm │ │ ├── es2017.grammar.ohm │ │ ├── es2018.grammar.ohm │ │ ├── es2019.grammar.ohm │ │ ├── es2020.grammar.ohm │ │ ├── es2021.grammar.ohm │ │ └── es2022.grammar.ohm │ ├── index.mjs │ ├── package-lock.json │ ├── package.json │ ├── scripts │ │ ├── README.md │ │ ├── dedent.py │ │ ├── extract-grammarkdown.mjs │ │ ├── generate-ecmascript-grammar.mjs │ │ └── grammarkdown.ohm │ ├── spec │ │ ├── LICENSE.txt │ │ ├── es2015 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ ├── es2016 │ │ │ ├── overrides.json │ │ │ ├── spec.grammar │ │ │ └── spec.strict.grammar │ │ ├── es2017 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ ├── es2018 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ ├── es2019 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ ├── es2020 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ ├── es2021 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ │ └── es2022 │ │ │ ├── overrides.json │ │ │ └── spec.grammar │ └── test │ │ ├── data │ │ └── esprima │ │ │ ├── ES6 │ │ │ ├── arrow-function │ │ │ │ ├── array-binding-pattern │ │ │ │ │ ├── array-binding-pattern-01.js │ │ │ │ │ ├── array-binding-pattern-01.tree.json │ │ │ │ │ ├── array-binding-pattern-02.js │ │ │ │ │ ├── array-binding-pattern-02.tree.json │ │ │ │ │ ├── array-binding-pattern-03.js │ │ │ │ │ ├── array-binding-pattern-03.tree.json │ │ │ │ │ ├── array-binding-pattern-empty.js │ │ │ │ │ ├── array-binding-pattern-empty.tree.json │ │ │ │ │ ├── elision.js │ │ │ │ │ ├── elision.tree.json │ │ │ │ │ ├── invalid-dup-param.failure.json │ │ │ │ │ ├── invalid-dup-param.js │ │ │ │ │ ├── invalid-elision-after-rest.failure.json │ │ │ │ │ └── invalid-elision-after-rest.js │ │ │ │ ├── arrow-rest-forgetting-comma.failure.json │ │ │ │ ├── arrow-rest-forgetting-comma.js │ │ │ │ ├── arrow-with-multiple-arg-and-rest.js │ │ │ │ ├── arrow-with-multiple-arg-and-rest.tree.json │ │ │ │ ├── arrow-with-multiple-rest.failure.json │ │ │ │ ├── arrow-with-multiple-rest.js │ │ │ │ ├── arrow-with-only-rest.js │ │ │ │ ├── arrow-with-only-rest.tree.json │ │ │ │ ├── concise-body-in.js │ │ │ │ ├── concise-body-in.tree.json │ │ │ │ ├── invalid-duplicated-names-rest-parameter.failure.json │ │ │ │ ├── invalid-duplicated-names-rest-parameter.js │ │ │ │ ├── invalid-duplicated-params.failure.json │ │ │ │ ├── invalid-duplicated-params.js │ │ │ │ ├── invalid-line-terminator-arrow.failure.json │ │ │ │ ├── invalid-line-terminator-arrow.js │ │ │ │ ├── invalid-param-strict-mode.failure.json │ │ │ │ ├── invalid-param-strict-mode.js │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ ├── migrated_0002.tree.json │ │ │ │ ├── migrated_0003.js │ │ │ │ ├── migrated_0003.tree.json │ │ │ │ ├── migrated_0004.js │ │ │ │ ├── migrated_0004.tree.json │ │ │ │ ├── migrated_0005.js │ │ │ │ ├── migrated_0005.tree.json │ │ │ │ ├── migrated_0006.js │ │ │ │ ├── migrated_0006.tree.json │ │ │ │ ├── migrated_0007.js │ │ │ │ ├── migrated_0007.tree.json │ │ │ │ ├── migrated_0008.js │ │ │ │ ├── migrated_0008.tree.json │ │ │ │ ├── migrated_0009.js │ │ │ │ ├── migrated_0009.tree.json │ │ │ │ ├── migrated_0010.js │ │ │ │ ├── migrated_0010.tree.json │ │ │ │ ├── migrated_0011.js │ │ │ │ ├── migrated_0011.tree.json │ │ │ │ ├── migrated_0012.js │ │ │ │ ├── migrated_0012.tree.json │ │ │ │ ├── migrated_0013.js │ │ │ │ ├── migrated_0013.tree.json │ │ │ │ ├── migrated_0014.js │ │ │ │ ├── migrated_0014.tree.json │ │ │ │ ├── migrated_0015.js │ │ │ │ ├── migrated_0015.tree.json │ │ │ │ ├── migrated_0016.js │ │ │ │ ├── migrated_0016.tree.json │ │ │ │ ├── migrated_0017.js │ │ │ │ ├── migrated_0017.tree.json │ │ │ │ ├── migrated_0018.js │ │ │ │ ├── migrated_0018.tree.json │ │ │ │ ├── migrated_0019.js │ │ │ │ ├── migrated_0019.tree.json │ │ │ │ ├── migrated_0020.js │ │ │ │ ├── migrated_0020.tree.json │ │ │ │ ├── non-arrow-param-followed-by-arrow.failure.json │ │ │ │ ├── non-arrow-param-followed-by-arrow.js │ │ │ │ ├── non-arrow-param-followed-by-rest.failure.json │ │ │ │ ├── non-arrow-param-followed-by-rest.js │ │ │ │ ├── object-binding-pattern │ │ │ │ │ ├── invalid-member-expr.failure.json │ │ │ │ │ ├── invalid-member-expr.js │ │ │ │ │ ├── invalid-method-in-pattern.failure.json │ │ │ │ │ ├── invalid-method-in-pattern.js │ │ │ │ │ ├── invalid-nested-param.failure.json │ │ │ │ │ ├── invalid-nested-param.js │ │ │ │ │ ├── invalid-pattern-without-parenthesis.failure.json │ │ │ │ │ ├── invalid-pattern-without-parenthesis.js │ │ │ │ │ ├── nested-cover-grammar.js │ │ │ │ │ ├── nested-cover-grammar.tree.json │ │ │ │ │ ├── object-binding-pattern-01.js │ │ │ │ │ ├── object-binding-pattern-01.tree.json │ │ │ │ │ ├── object-binding-pattern-empty.js │ │ │ │ │ └── object-binding-pattern-empty.tree.json │ │ │ │ ├── param-with-rest-without-arrow.failure.json │ │ │ │ ├── param-with-rest-without-arrow.js │ │ │ │ ├── rest-without-arrow.failure.json │ │ │ │ └── rest-without-arrow.js │ │ │ ├── binary-integer-literal │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ ├── migrated_0002.tree.json │ │ │ │ ├── migrated_0003.js │ │ │ │ ├── migrated_0003.tree.json │ │ │ │ ├── migrated_0004.js │ │ │ │ ├── migrated_0004.tree.json │ │ │ │ ├── migrated_0005.js │ │ │ │ └── migrated_0005.tree.json │ │ │ ├── binding-pattern │ │ │ │ ├── array-pattern │ │ │ │ │ ├── dupe-param.failure.json │ │ │ │ │ ├── dupe-param.js │ │ │ │ │ ├── elision.js │ │ │ │ │ ├── elision.tree.json │ │ │ │ │ ├── empty-pattern-catch-param.js │ │ │ │ │ ├── empty-pattern-catch-param.tree.json │ │ │ │ │ ├── empty-pattern-fn.js │ │ │ │ │ ├── empty-pattern-fn.tree.json │ │ │ │ │ ├── empty-pattern-lexical.js │ │ │ │ │ ├── empty-pattern-lexical.tree.json │ │ │ │ │ ├── empty-pattern-var.js │ │ │ │ │ ├── empty-pattern-var.tree.json │ │ │ │ │ ├── for-let-let.js │ │ │ │ │ ├── for-let-let.tree.json │ │ │ │ │ ├── hole.js │ │ │ │ │ ├── hole.tree.json │ │ │ │ │ ├── invalid-strict-for-let-let.failure.json │ │ │ │ │ ├── invalid-strict-for-let-let.js │ │ │ │ │ ├── nested-pattern.js │ │ │ │ │ ├── nested-pattern.tree.json │ │ │ │ │ ├── patterned-catch-dupe.failure.json │ │ │ │ │ ├── patterned-catch-dupe.js │ │ │ │ │ ├── patterned-catch.js │ │ │ │ │ ├── patterned-catch.tree.json │ │ │ │ │ ├── rest-element-array-pattern.js │ │ │ │ │ ├── rest-element-array-pattern.tree.json │ │ │ │ │ ├── rest-element-object-pattern.js │ │ │ │ │ ├── rest-element-object-pattern.tree.json │ │ │ │ │ ├── rest.elision.failure.json │ │ │ │ │ ├── rest.elision.js │ │ │ │ │ ├── rest.js │ │ │ │ │ ├── rest.tree.json │ │ │ │ │ ├── tailing-hold.js │ │ │ │ │ ├── tailing-hold.tree.json │ │ │ │ │ ├── var-for-in.js │ │ │ │ │ ├── var-for-in.tree.json │ │ │ │ │ ├── var_let_array.js │ │ │ │ │ ├── var_let_array.tree.json │ │ │ │ │ ├── with-default-catch-param-fail.failure.json │ │ │ │ │ ├── with-default-catch-param-fail.js │ │ │ │ │ ├── with-default-catch-param.js │ │ │ │ │ ├── with-default-catch-param.tree.json │ │ │ │ │ ├── with-default-fn.js │ │ │ │ │ ├── with-default-fn.tree.json │ │ │ │ │ ├── with-object-pattern.js │ │ │ │ │ └── with-object-pattern.tree.json │ │ │ │ └── object-pattern │ │ │ │ │ ├── elision.js │ │ │ │ │ ├── elision.tree.json │ │ │ │ │ ├── empty-catch-param.js │ │ │ │ │ ├── empty-catch-param.tree.json │ │ │ │ │ ├── empty-fn.js │ │ │ │ │ ├── empty-fn.tree.json │ │ │ │ │ ├── empty-for-lex.js │ │ │ │ │ ├── empty-for-lex.tree.json │ │ │ │ │ ├── empty-lexical.js │ │ │ │ │ ├── empty-lexical.tree.json │ │ │ │ │ ├── empty-var.js │ │ │ │ │ ├── empty-var.tree.json │ │ │ │ │ ├── for-let-let.js │ │ │ │ │ ├── for-let-let.tree.json │ │ │ │ │ ├── invalid-strict-for-let-let.failure.json │ │ │ │ │ ├── invalid-strict-for-let-let.js │ │ │ │ │ ├── nested.js │ │ │ │ │ ├── nested.tree.json │ │ │ │ │ ├── properties.js │ │ │ │ │ ├── properties.tree.json │ │ │ │ │ ├── var-for-in.js │ │ │ │ │ └── var-for-in.tree.json │ │ │ ├── class │ │ │ │ ├── invalid-labelled-class-declaration.js │ │ │ │ ├── invalid-labelled-class-declaration.tree.json │ │ │ │ ├── invalid-setter-method-rest.js │ │ │ │ ├── invalid-setter-method-rest.tree.json │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ ├── migrated_0002.tree.json │ │ │ │ ├── migrated_0003.js │ │ │ │ ├── migrated_0003.tree.json │ │ │ │ ├── migrated_0004.js │ │ │ │ ├── migrated_0004.tree.json │ │ │ │ ├── migrated_0005.js │ │ │ │ ├── migrated_0005.tree.json │ │ │ │ ├── migrated_0006.js │ │ │ │ ├── migrated_0006.tree.json │ │ │ │ ├── migrated_0007.js │ │ │ │ ├── migrated_0007.tree.json │ │ │ │ ├── migrated_0008.js │ │ │ │ ├── migrated_0008.tree.json │ │ │ │ ├── migrated_0009.js │ │ │ │ ├── migrated_0009.tree.json │ │ │ │ ├── migrated_0010.js │ │ │ │ ├── migrated_0010.tree.json │ │ │ │ ├── migrated_0011.js │ │ │ │ ├── migrated_0011.tree.json │ │ │ │ ├── migrated_0012.js │ │ │ │ ├── migrated_0012.tree.json │ │ │ │ ├── migrated_0013.js │ │ │ │ ├── migrated_0013.tree.json │ │ │ │ ├── migrated_0014.js │ │ │ │ ├── migrated_0014.tree.json │ │ │ │ ├── migrated_0015.js │ │ │ │ ├── migrated_0015.tree.json │ │ │ │ ├── migrated_0016.js │ │ │ │ ├── migrated_0016.tree.json │ │ │ │ ├── migrated_0017.js │ │ │ │ ├── migrated_0017.tree.json │ │ │ │ ├── migrated_0018.js │ │ │ │ ├── migrated_0018.tree.json │ │ │ │ ├── migrated_0019.js │ │ │ │ ├── migrated_0019.tree.json │ │ │ │ ├── migrated_0020.js │ │ │ │ ├── migrated_0020.tree.json │ │ │ │ ├── migrated_0021.js │ │ │ │ ├── migrated_0021.tree.json │ │ │ │ ├── migrated_0022.js │ │ │ │ ├── migrated_0022.tree.json │ │ │ │ ├── migrated_0023.js │ │ │ │ ├── migrated_0023.tree.json │ │ │ │ ├── migrated_0024.js │ │ │ │ ├── migrated_0024.tree.json │ │ │ │ ├── migrated_0025.js │ │ │ │ ├── migrated_0025.tree.json │ │ │ │ ├── migrated_0026.js │ │ │ │ └── migrated_0026.tree.json │ │ │ ├── default-parameter-value │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ └── migrated_0002.tree.json │ │ │ ├── destructuring-assignment │ │ │ │ ├── array-pattern │ │ │ │ │ ├── dup-assignment.js │ │ │ │ │ ├── dup-assignment.tree.json │ │ │ │ │ ├── elision.js │ │ │ │ │ ├── elision.tree.json │ │ │ │ │ ├── member-expr-in-rest.js │ │ │ │ │ ├── member-expr-in-rest.tree.json │ │ │ │ │ ├── nested-assignment.js │ │ │ │ │ ├── nested-assignment.tree.json │ │ │ │ │ ├── nested-cover-grammar.js │ │ │ │ │ ├── nested-cover-grammar.tree.json │ │ │ │ │ ├── simple-assignment.js │ │ │ │ │ └── simple-assignment.tree.json │ │ │ │ ├── invalid-cover-grammar.failure.json │ │ │ │ ├── invalid-cover-grammar.js │ │ │ │ ├── invalid-group-assignment.failure.json │ │ │ │ ├── invalid-group-assignment.js │ │ │ │ └── object-pattern │ │ │ │ │ ├── empty-object-pattern-assignment.js │ │ │ │ │ ├── empty-object-pattern-assignment.tree.json │ │ │ │ │ ├── invalid-lhs-01.failure.json │ │ │ │ │ ├── invalid-lhs-01.js │ │ │ │ │ ├── invalid-lhs-02.failure.json │ │ │ │ │ ├── invalid-lhs-02.js │ │ │ │ │ ├── invalid-pattern-with-method.failure.json │ │ │ │ │ ├── invalid-pattern-with-method.js │ │ │ │ │ ├── nested-cover-grammar.js │ │ │ │ │ ├── nested-cover-grammar.tree.json │ │ │ │ │ ├── object-pattern-assignment.js │ │ │ │ │ └── object-pattern-assignment.tree.json │ │ │ ├── export-declaration │ │ │ │ ├── export-const-number.js │ │ │ │ ├── export-const-number.tree.json │ │ │ │ ├── export-default-array.js │ │ │ │ ├── export-default-array.tree.json │ │ │ │ ├── export-default-assignment.module.js │ │ │ │ ├── export-default-assignment.module.tree.json │ │ │ │ ├── export-default-class.js │ │ │ │ ├── export-default-class.tree.json │ │ │ │ ├── export-default-expression.js │ │ │ │ ├── export-default-expression.tree.json │ │ │ │ ├── export-default-function.js │ │ │ │ ├── export-default-function.tree.json │ │ │ │ ├── export-default-named-class.js │ │ │ │ ├── export-default-named-class.tree.json │ │ │ │ ├── export-default-named-function.js │ │ │ │ ├── export-default-named-function.tree.json │ │ │ │ ├── export-default-number.js │ │ │ │ ├── export-default-number.tree.json │ │ │ │ ├── export-default-object.js │ │ │ │ ├── export-default-object.tree.json │ │ │ │ ├── export-default-value.js │ │ │ │ ├── export-default-value.tree.json │ │ │ │ ├── export-from-batch.js │ │ │ │ ├── export-from-batch.tree.json │ │ │ │ ├── export-from-default.js │ │ │ │ ├── export-from-default.tree.json │ │ │ │ ├── export-from-named-as-default.js │ │ │ │ ├── export-from-named-as-default.tree.json │ │ │ │ ├── export-from-named-as-specifier.js │ │ │ │ ├── export-from-named-as-specifier.tree.json │ │ │ │ ├── export-from-named-as-specifiers.js │ │ │ │ ├── export-from-named-as-specifiers.tree.json │ │ │ │ ├── export-from-specifier.js │ │ │ │ ├── export-from-specifier.tree.json │ │ │ │ ├── export-from-specifiers.js │ │ │ │ ├── export-from-specifiers.tree.json │ │ │ │ ├── export-function-declaration.js │ │ │ │ ├── export-function-declaration.tree.json │ │ │ │ ├── export-function.js │ │ │ │ ├── export-function.tree.json │ │ │ │ ├── export-let-number.js │ │ │ │ ├── export-let-number.tree.json │ │ │ │ ├── export-named-as-default.js │ │ │ │ ├── export-named-as-default.tree.json │ │ │ │ ├── export-named-as-specifier.js │ │ │ │ ├── export-named-as-specifier.tree.json │ │ │ │ ├── export-named-as-specifiers.js │ │ │ │ ├── export-named-as-specifiers.tree.json │ │ │ │ ├── export-named-empty.js │ │ │ │ ├── export-named-empty.tree.json │ │ │ │ ├── export-named-keyword-as-specifier.js │ │ │ │ ├── export-named-keyword-as-specifier.tree.json │ │ │ │ ├── export-named-keyword-specifier.js │ │ │ │ ├── export-named-keyword-specifier.tree.json │ │ │ │ ├── export-named-specifier.js │ │ │ │ ├── export-named-specifier.tree.json │ │ │ │ ├── export-named-specifiers-comma.js │ │ │ │ ├── export-named-specifiers-comma.tree.json │ │ │ │ ├── export-named-specifiers.js │ │ │ │ ├── export-named-specifiers.tree.json │ │ │ │ ├── export-var-anonymous-function.js │ │ │ │ ├── export-var-anonymous-function.tree.json │ │ │ │ ├── export-var-number.js │ │ │ │ ├── export-var-number.tree.json │ │ │ │ ├── export-var.js │ │ │ │ ├── export-var.tree.json │ │ │ │ ├── invalid-export-batch-missing-from-clause.module.failure.json │ │ │ │ ├── invalid-export-batch-missing-from-clause.module.js │ │ │ │ ├── invalid-export-batch-token.module.failure.json │ │ │ │ ├── invalid-export-batch-token.module.js │ │ │ │ ├── invalid-export-default-equal.module.failure.json │ │ │ │ ├── invalid-export-default-equal.module.js │ │ │ │ ├── invalid-export-default-token.module.failure.json │ │ │ │ ├── invalid-export-default-token.module.js │ │ │ │ ├── invalid-export-default.module.failure.json │ │ │ │ ├── invalid-export-default.module.js │ │ │ │ ├── invalid-export-named-default.module.failure.json │ │ │ │ └── invalid-export-named-default.module.js │ │ │ ├── for-of │ │ │ │ ├── for-of-array-pattern-let.js │ │ │ │ ├── for-of-array-pattern-let.tree.json │ │ │ │ ├── for-of-array-pattern-var.js │ │ │ │ ├── for-of-array-pattern-var.tree.json │ │ │ │ ├── for-of-array-pattern.js │ │ │ │ ├── for-of-array-pattern.tree.json │ │ │ │ ├── for-of-let.js │ │ │ │ ├── for-of-let.tree.json │ │ │ │ ├── for-of-object-pattern-const.js │ │ │ │ ├── for-of-object-pattern-const.tree.json │ │ │ │ ├── for-of-object-pattern-var.js │ │ │ │ ├── for-of-object-pattern-var.tree.json │ │ │ │ ├── for-of-object-pattern.js │ │ │ │ ├── for-of-object-pattern.tree.json │ │ │ │ ├── for-of-with-const.js │ │ │ │ ├── for-of-with-const.tree.json │ │ │ │ ├── for-of-with-let.js │ │ │ │ ├── for-of-with-let.tree.json │ │ │ │ ├── for-of-with-var.js │ │ │ │ ├── for-of-with-var.tree.json │ │ │ │ ├── for-of.js │ │ │ │ ├── for-of.tree.json │ │ │ │ ├── invalid-assign-for-of.failure.json │ │ │ │ ├── invalid-assign-for-of.js │ │ │ │ ├── invalid-const-init.failure.json │ │ │ │ ├── invalid-const-init.js │ │ │ │ ├── invalid-decl-cls.failure.json │ │ │ │ ├── invalid-decl-cls.js │ │ │ │ ├── invalid-for-of-array-pattern.failure.json │ │ │ │ ├── invalid-for-of-array-pattern.js │ │ │ │ ├── invalid-for-of-object-pattern.failure.json │ │ │ │ ├── invalid-for-of-object-pattern.js │ │ │ │ ├── invalid-let-init.failure.json │ │ │ │ ├── invalid-let-init.js │ │ │ │ ├── invalid-lhs-init.failure.json │ │ │ │ ├── invalid-lhs-init.js │ │ │ │ ├── invalid-strict-for-of-let.failure.json │ │ │ │ ├── invalid-strict-for-of-let.js │ │ │ │ ├── invalid-var-init.failure.json │ │ │ │ ├── invalid-var-init.js │ │ │ │ ├── invalid_const_let.failure.json │ │ │ │ ├── invalid_const_let.js │ │ │ │ ├── invalid_let_let.failure.json │ │ │ │ ├── invalid_let_let.js │ │ │ │ ├── let-of-of.js │ │ │ │ ├── let-of-of.tree.json │ │ │ │ ├── unexpected-number.failure.json │ │ │ │ └── unexpected-number.js │ │ │ ├── generator │ │ │ │ ├── generator-declaration-with-params.js │ │ │ │ ├── generator-declaration-with-params.tree.json │ │ │ │ ├── generator-declaration-with-yield-delegate.js │ │ │ │ ├── generator-declaration-with-yield-delegate.tree.json │ │ │ │ ├── generator-declaration-with-yield.js │ │ │ │ ├── generator-declaration-with-yield.tree.json │ │ │ │ ├── generator-declaration.js │ │ │ │ ├── generator-declaration.tree.json │ │ │ │ ├── generator-expression-rest-param.js │ │ │ │ ├── generator-expression-rest-param.tree.json │ │ │ │ ├── generator-expression-with-params.js │ │ │ │ ├── generator-expression-with-params.tree.json │ │ │ │ ├── generator-expression-with-yield-delegate.js │ │ │ │ ├── generator-expression-with-yield-delegate.tree.json │ │ │ │ ├── generator-expression-with-yield.js │ │ │ │ ├── generator-expression-with-yield.tree.json │ │ │ │ ├── generator-expression.js │ │ │ │ ├── generator-expression.tree.json │ │ │ │ ├── generator-method-with-computed-name.failure.json │ │ │ │ ├── generator-method-with-computed-name.js │ │ │ │ ├── generator-method-with-invalid-computed-name.failure.json │ │ │ │ ├── generator-method-with-invalid-computed-name.js │ │ │ │ ├── generator-method-with-params.js │ │ │ │ ├── generator-method-with-params.tree.json │ │ │ │ ├── generator-method-with-yield-delegate.js │ │ │ │ ├── generator-method-with-yield-delegate.tree.json │ │ │ │ ├── generator-method-with-yield-expression.js │ │ │ │ ├── generator-method-with-yield-expression.tree.json │ │ │ │ ├── generator-method-with-yield-line-terminator.js │ │ │ │ ├── generator-method-with-yield-line-terminator.tree.json │ │ │ │ ├── generator-method-with-yield.js │ │ │ │ ├── generator-method-with-yield.tree.json │ │ │ │ ├── generator-method.js │ │ │ │ ├── generator-method.tree.json │ │ │ │ ├── generator-parameter-binding-element.failure.json │ │ │ │ ├── generator-parameter-binding-element.js │ │ │ │ ├── generator-parameter-binding-property-reserved.failure.json │ │ │ │ ├── generator-parameter-binding-property-reserved.js │ │ │ │ ├── generator-parameter-binding-property.failure.json │ │ │ │ ├── generator-parameter-binding-property.js │ │ │ │ ├── generator-parameter-computed-property-name.failure.json │ │ │ │ ├── generator-parameter-computed-property-name.js │ │ │ │ ├── generator-parameter-invalid-binding-element.failure.json │ │ │ │ ├── generator-parameter-invalid-binding-element.js │ │ │ │ ├── generator-parameter-invalid-binding-property.failure.json │ │ │ │ ├── generator-parameter-invalid-binding-property.js │ │ │ │ ├── generator-parameter-invalid-computed-property-name.failure.json │ │ │ │ ├── generator-parameter-invalid-computed-property-name.js │ │ │ │ ├── incomplete-yield-delegate.failure.json │ │ │ │ ├── incomplete-yield-delegate.js │ │ │ │ ├── invalid-labelled-generator.js │ │ │ │ ├── invalid-labelled-generator.tree.json │ │ │ │ ├── malformed-generator-method-2.failure.json │ │ │ │ ├── malformed-generator-method-2.js │ │ │ │ ├── malformed-generator-method.failure.json │ │ │ │ ├── malformed-generator-method.js │ │ │ │ ├── static-generator-method-with-computed-name.js │ │ │ │ ├── static-generator-method-with-computed-name.tree.json │ │ │ │ ├── static-generator-method.js │ │ │ │ └── static-generator-method.tree.json │ │ │ ├── identifier │ │ │ │ ├── dakuten_handakuten.js │ │ │ │ ├── dakuten_handakuten.tree.json │ │ │ │ ├── escaped_all.js │ │ │ │ ├── escaped_all.tree.json │ │ │ │ ├── escaped_math_alef.js │ │ │ │ ├── escaped_math_alef.tree.json │ │ │ │ ├── escaped_math_dal_part.js │ │ │ │ ├── escaped_math_dal_part.tree.json │ │ │ │ ├── escaped_math_kaf_lam.js │ │ │ │ ├── escaped_math_kaf_lam.tree.json │ │ │ │ ├── escaped_math_zain_start.js │ │ │ │ ├── escaped_math_zain_start.tree.json │ │ │ │ ├── escaped_part.js │ │ │ │ ├── escaped_part.tree.json │ │ │ │ ├── escaped_start.js │ │ │ │ ├── escaped_start.tree.json │ │ │ │ ├── estimated.js │ │ │ │ ├── estimated.tree.json │ │ │ │ ├── ethiopic_digits.js │ │ │ │ ├── ethiopic_digits.tree.json │ │ │ │ ├── invalid-hex-escape-sequence.failure.json │ │ │ │ ├── invalid-hex-escape-sequence.js │ │ │ │ ├── invalid_escaped_surrogate_pairs.failure.json │ │ │ │ ├── invalid_escaped_surrogate_pairs.js │ │ │ │ ├── invalid_expression_await.module.failure.json │ │ │ │ ├── invalid_expression_await.module.js │ │ │ │ ├── invalid_function_await.module.failure.json │ │ │ │ ├── invalid_function_await.module.js │ │ │ │ ├── invalid_id_smp.failure.json │ │ │ │ ├── invalid_id_smp.js │ │ │ │ ├── invalid_lone_surrogate.failure.json │ │ │ │ ├── invalid_lone_surrogate.source.js │ │ │ │ ├── invalid_var_await.module.failure.json │ │ │ │ ├── invalid_var_await.module.js │ │ │ │ ├── math_alef.js │ │ │ │ ├── math_alef.tree.json │ │ │ │ ├── math_dal_part.js │ │ │ │ ├── math_dal_part.tree.json │ │ │ │ ├── math_kaf_lam.js │ │ │ │ ├── math_kaf_lam.tree.json │ │ │ │ ├── math_zain_start.js │ │ │ │ ├── math_zain_start.tree.json │ │ │ │ ├── module_await.js │ │ │ │ ├── module_await.tree.json │ │ │ │ ├── valid_await.js │ │ │ │ ├── valid_await.tree.json │ │ │ │ ├── weierstrass.js │ │ │ │ ├── weierstrass.tree.json │ │ │ │ ├── weierstrass_weierstrass.js │ │ │ │ └── weierstrass_weierstrass.tree.json │ │ │ ├── import-declaration │ │ │ │ ├── import-default-and-named-specifiers.js │ │ │ │ ├── import-default-and-named-specifiers.tree.json │ │ │ │ ├── import-default-and-namespace-specifiers.js │ │ │ │ ├── import-default-and-namespace-specifiers.tree.json │ │ │ │ ├── import-default-as.js │ │ │ │ ├── import-default-as.tree.json │ │ │ │ ├── import-default.js │ │ │ │ ├── import-default.tree.json │ │ │ │ ├── import-jquery.js │ │ │ │ ├── import-jquery.tree.json │ │ │ │ ├── import-module.js │ │ │ │ ├── import-module.tree.json │ │ │ │ ├── import-named-as-specifier.js │ │ │ │ ├── import-named-as-specifier.tree.json │ │ │ │ ├── import-named-as-specifiers.js │ │ │ │ ├── import-named-as-specifiers.tree.json │ │ │ │ ├── import-named-empty.js │ │ │ │ ├── import-named-empty.tree.json │ │ │ │ ├── import-named-specifier.js │ │ │ │ ├── import-named-specifier.tree.json │ │ │ │ ├── import-named-specifiers-comma.js │ │ │ │ ├── import-named-specifiers-comma.tree.json │ │ │ │ ├── import-named-specifiers.js │ │ │ │ ├── import-named-specifiers.tree.json │ │ │ │ ├── import-namespace-specifier.js │ │ │ │ ├── import-namespace-specifier.tree.json │ │ │ │ ├── import-null-as-nil.js │ │ │ │ ├── import-null-as-nil.tree.json │ │ │ │ ├── invalid-import-boolean.module.failure.json │ │ │ │ ├── invalid-import-boolean.module.js │ │ │ │ ├── invalid-import-default-after-named-after-default.module.failure.json │ │ │ │ ├── invalid-import-default-after-named-after-default.module.js │ │ │ │ ├── invalid-import-default-after-named.module.failure.json │ │ │ │ ├── invalid-import-default-after-named.module.js │ │ │ │ ├── invalid-import-default-missing-module-specifier.module.failure.json │ │ │ │ ├── invalid-import-default-missing-module-specifier.module.js │ │ │ │ ├── invalid-import-default-module-specifier.module.failure.json │ │ │ │ ├── invalid-import-default-module-specifier.module.js │ │ │ │ ├── invalid-import-default.module.failure.json │ │ │ │ ├── invalid-import-default.module.js │ │ │ │ ├── invalid-import-keyword.module.failure.json │ │ │ │ ├── invalid-import-keyword.module.js │ │ │ │ ├── invalid-import-missing-comma.module.failure.json │ │ │ │ ├── invalid-import-missing-comma.module.js │ │ │ │ ├── invalid-import-missing-module-specifier.module.failure.json │ │ │ │ ├── invalid-import-missing-module-specifier.module.js │ │ │ │ ├── invalid-import-module-specifier.module.failure.json │ │ │ │ ├── invalid-import-module-specifier.module.js │ │ │ │ ├── invalid-import-named-after-named.module.failure.json │ │ │ │ ├── invalid-import-named-after-named.module.js │ │ │ │ ├── invalid-import-named-after-namespace.module.failure.json │ │ │ │ ├── invalid-import-named-after-namespace.module.js │ │ │ │ ├── invalid-import-named-as-missing-from.module.failure.json │ │ │ │ ├── invalid-import-named-as-missing-from.module.js │ │ │ │ ├── invalid-import-namespace-after-named.module.failure.json │ │ │ │ ├── invalid-import-namespace-after-named.module.js │ │ │ │ ├── invalid-import-namespace-missing-as.module.failure.json │ │ │ │ ├── invalid-import-namespace-missing-as.module.js │ │ │ │ ├── invalid-import-null.module.failure.json │ │ │ │ ├── invalid-import-null.module.js │ │ │ │ ├── invalid-import-specifiers.module.failure.json │ │ │ │ └── invalid-import-specifiers.module.js │ │ │ ├── lexical-declaration │ │ │ │ ├── for_let_in.js │ │ │ │ ├── for_let_in.tree.json │ │ │ │ ├── invalid_complex_binding_without_init.failure.json │ │ │ │ ├── invalid_complex_binding_without_init.js │ │ │ │ ├── invalid_const_const.failure.json │ │ │ │ ├── invalid_const_const.js │ │ │ │ ├── invalid_const_forin.failure.json │ │ │ │ ├── invalid_const_forin.js │ │ │ │ ├── invalid_const_let.failure.json │ │ │ │ ├── invalid_const_let.js │ │ │ │ ├── invalid_for_const_declarations.failure.json │ │ │ │ ├── invalid_for_const_declarations.js │ │ │ │ ├── invalid_for_const_let.failure.json │ │ │ │ ├── invalid_for_const_let.js │ │ │ │ ├── invalid_for_let_declarations.failure.json │ │ │ │ ├── invalid_for_let_declarations.js │ │ │ │ ├── invalid_for_let_init.failure.json │ │ │ │ ├── invalid_for_let_init.js │ │ │ │ ├── invalid_for_let_let.failure.json │ │ │ │ ├── invalid_for_let_let.js │ │ │ │ ├── invalid_for_let_pattern.failure.json │ │ │ │ ├── invalid_for_let_pattern.js │ │ │ │ ├── invalid_forin_const_let.failure.json │ │ │ │ ├── invalid_forin_const_let.js │ │ │ │ ├── invalid_forin_let_let.failure.json │ │ │ │ ├── invalid_forin_let_let.js │ │ │ │ ├── invalid_let_declarations.failure.json │ │ │ │ ├── invalid_let_declarations.js │ │ │ │ ├── invalid_let_for_in.failure.json │ │ │ │ ├── invalid_let_for_in.js │ │ │ │ ├── invalid_let_forin.failure.json │ │ │ │ ├── invalid_let_forin.js │ │ │ │ ├── invalid_let_init.failure.json │ │ │ │ ├── invalid_let_init.js │ │ │ │ ├── invalid_let_let.failure.json │ │ │ │ ├── invalid_let_let.js │ │ │ │ ├── invalid_strict_const_const.failure.json │ │ │ │ ├── invalid_strict_const_const.js │ │ │ │ ├── invalid_strict_const_let.failure.json │ │ │ │ ├── invalid_strict_const_let.js │ │ │ │ ├── invalid_trailing_comma_1.failure.json │ │ │ │ ├── invalid_trailing_comma_1.js │ │ │ │ ├── invalid_trailing_comma_2.failure.json │ │ │ │ ├── invalid_trailing_comma_2.js │ │ │ │ ├── invalid_trailing_comma_3.failure.json │ │ │ │ ├── invalid_trailing_comma_3.js │ │ │ │ ├── invalid_trailing_comma_4.failure.json │ │ │ │ ├── invalid_trailing_comma_4.js │ │ │ │ ├── invalid_trailing_comma_5.failure.json │ │ │ │ ├── invalid_trailing_comma_5.js │ │ │ │ ├── invalid_trailing_comma_6.failure.json │ │ │ │ ├── invalid_trailing_comma_6.js │ │ │ │ ├── invalid_trailing_comma_7.failure.json │ │ │ │ ├── invalid_trailing_comma_7.js │ │ │ │ ├── let_assign.js │ │ │ │ ├── let_assign.tree.json │ │ │ │ ├── let_identifier.js │ │ │ │ ├── let_identifier.tree.json │ │ │ │ ├── let_member.js │ │ │ │ ├── let_member.tree.json │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── module_let.module.js │ │ │ │ └── module_let.module.tree.json │ │ │ ├── meta-property │ │ │ │ ├── assign-new-target.js │ │ │ │ ├── assign-new-target.tree.json │ │ │ │ ├── invalid-dots.failure.json │ │ │ │ ├── invalid-dots.js │ │ │ │ ├── invalid-new-target.failure.json │ │ │ │ ├── invalid-new-target.js │ │ │ │ ├── new-new-target.js │ │ │ │ ├── new-new-target.tree.json │ │ │ │ ├── new-target-declaration.js │ │ │ │ ├── new-target-declaration.tree.json │ │ │ │ ├── new-target-expression.js │ │ │ │ ├── new-target-expression.tree.json │ │ │ │ ├── new-target-invoke.js │ │ │ │ ├── new-target-invoke.tree.json │ │ │ │ ├── new-target-precedence.js │ │ │ │ ├── new-target-precedence.tree.json │ │ │ │ ├── unknown-property.failure.json │ │ │ │ └── unknown-property.js │ │ │ ├── method-definition │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ ├── migrated_0002.tree.json │ │ │ │ ├── migrated_0003.js │ │ │ │ ├── migrated_0003.tree.json │ │ │ │ ├── migrated_0004.js │ │ │ │ └── migrated_0004.tree.json │ │ │ ├── object-initialiser │ │ │ │ ├── invalid-proto-getter-literal-identifier.failure.json │ │ │ │ ├── invalid-proto-getter-literal-identifier.js │ │ │ │ ├── invalid-proto-identifier-literal.failure.json │ │ │ │ ├── invalid-proto-identifier-literal.js │ │ │ │ ├── invalid-proto-identifiers.failure.json │ │ │ │ ├── invalid-proto-identifiers.js │ │ │ │ ├── invalid-proto-literal-identifier.failure.json │ │ │ │ ├── invalid-proto-literal-identifier.js │ │ │ │ ├── invalid-proto-literals.failure.json │ │ │ │ ├── invalid-proto-literals.js │ │ │ │ ├── invalid-proto-setter-literal-identifier.failure.json │ │ │ │ ├── invalid-proto-setter-literal-identifier.js │ │ │ │ ├── proto-identifier-getter-setter.js │ │ │ │ ├── proto-identifier-getter-setter.tree.json │ │ │ │ ├── proto-identifier-getter.js │ │ │ │ ├── proto-identifier-getter.tree.json │ │ │ │ ├── proto-identifier-method.js │ │ │ │ ├── proto-identifier-method.tree.json │ │ │ │ ├── proto-identifier-setter.js │ │ │ │ ├── proto-identifier-setter.tree.json │ │ │ │ ├── proto-identifier-shorthand.js │ │ │ │ ├── proto-identifier-shorthand.tree.json │ │ │ │ ├── proto-literal-getter-setter.js │ │ │ │ ├── proto-literal-getter-setter.tree.json │ │ │ │ ├── proto-literal-getter.js │ │ │ │ ├── proto-literal-getter.tree.json │ │ │ │ ├── proto-literal-method.js │ │ │ │ ├── proto-literal-method.tree.json │ │ │ │ ├── proto-literal-setter.js │ │ │ │ ├── proto-literal-setter.tree.json │ │ │ │ ├── proto-literal-shorthand.js │ │ │ │ ├── proto-literal-shorthand.tree.json │ │ │ │ ├── proto-shorthand-assignments.js │ │ │ │ ├── proto-shorthand-assignments.tree.json │ │ │ │ ├── proto-shorthand-identifier.js │ │ │ │ ├── proto-shorthand-identifier.tree.json │ │ │ │ ├── proto-shorthand-literal.js │ │ │ │ ├── proto-shorthand-literal.tree.json │ │ │ │ ├── proto-shorthands.js │ │ │ │ └── proto-shorthands.tree.json │ │ │ ├── object-literal-property-value-shorthand │ │ │ │ ├── migrated_0000.js │ │ │ │ └── migrated_0000.tree.json │ │ │ ├── octal-integer-literal │ │ │ │ ├── migrated_0000.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.js │ │ │ │ ├── migrated_0002.tree.json │ │ │ │ ├── migrated_0003.js │ │ │ │ ├── migrated_0003.tree.json │ │ │ │ ├── migrated_0004.js │ │ │ │ ├── migrated_0004.tree.json │ │ │ │ ├── migrated_0005.js │ │ │ │ ├── migrated_0005.tree.json │ │ │ │ ├── migrated_0006.js │ │ │ │ └── migrated_0006.tree.json │ │ │ ├── program │ │ │ │ ├── module │ │ │ │ │ ├── invalid-delete.module.failure.json │ │ │ │ │ ├── invalid-delete.module.js │ │ │ │ │ ├── invalid-export-if.module.failure.json │ │ │ │ │ ├── invalid-export-if.module.js │ │ │ │ │ ├── invalid-export-in-function.module.failure.json │ │ │ │ │ ├── invalid-export-in-function.module.js │ │ │ │ │ ├── invalid-import-in-function.module.failure.json │ │ │ │ │ ├── invalid-import-in-function.module.js │ │ │ │ │ ├── invalid-with.module.failure.json │ │ │ │ │ └── invalid-with.module.js │ │ │ │ └── script │ │ │ │ │ ├── invalid-export-declaration.failure.json │ │ │ │ │ ├── invalid-export-declaration.js │ │ │ │ │ ├── invalid-import-declaration.failure.json │ │ │ │ │ └── invalid-import-declaration.js │ │ │ ├── rest-parameter │ │ │ │ ├── arrow-rest-parameter-array.js │ │ │ │ ├── arrow-rest-parameter-array.tree.json │ │ │ │ ├── arrow-rest-parameter-object.js │ │ │ │ ├── arrow-rest-parameter-object.tree.json │ │ │ │ ├── function-declaration.js │ │ │ │ ├── function-declaration.tree.json │ │ │ │ ├── function-expression.js │ │ │ │ ├── function-expression.tree.json │ │ │ │ ├── invalid-setter-rest.js │ │ │ │ ├── invalid-setter-rest.tree.json │ │ │ │ ├── object-method.js │ │ │ │ ├── object-method.tree.json │ │ │ │ ├── object-shorthand-method.js │ │ │ │ ├── object-shorthand-method.tree.json │ │ │ │ ├── rest-parameter-array.js │ │ │ │ ├── rest-parameter-array.tree.json │ │ │ │ ├── rest-parameter-object.js │ │ │ │ └── rest-parameter-object.tree.json │ │ │ ├── spread-element │ │ │ │ ├── call-multi-spread.js │ │ │ │ ├── call-multi-spread.tree.json │ │ │ │ ├── call-spread-default.js │ │ │ │ ├── call-spread-default.tree.json │ │ │ │ ├── call-spread-first.js │ │ │ │ ├── call-spread-first.tree.json │ │ │ │ ├── call-spread-number.js │ │ │ │ ├── call-spread-number.tree.json │ │ │ │ ├── call-spread.js │ │ │ │ ├── call-spread.tree.json │ │ │ │ ├── invalid-call-dot-dot.failure.json │ │ │ │ ├── invalid-call-dot-dot.js │ │ │ │ ├── invalid-call-dots.failure.json │ │ │ │ ├── invalid-call-dots.js │ │ │ │ ├── invalid-call-spreads.failure.json │ │ │ │ ├── invalid-call-spreads.js │ │ │ │ ├── invalid-new-dot-dot.failure.json │ │ │ │ ├── invalid-new-dot-dot.js │ │ │ │ ├── invalid-new-dots.failure.json │ │ │ │ ├── invalid-new-dots.js │ │ │ │ ├── invalid-new-spreads.failure.json │ │ │ │ ├── invalid-new-spreads.js │ │ │ │ ├── new-multi-spread.js │ │ │ │ ├── new-multi-spread.tree.json │ │ │ │ ├── new-spread-default.js │ │ │ │ ├── new-spread-default.tree.json │ │ │ │ ├── new-spread-first.js │ │ │ │ ├── new-spread-first.tree.json │ │ │ │ ├── new-spread-number.js │ │ │ │ ├── new-spread-number.tree.json │ │ │ │ ├── new-spread.js │ │ │ │ └── new-spread.tree.json │ │ │ ├── super-property │ │ │ │ ├── arrow_super.js │ │ │ │ ├── arrow_super.tree.json │ │ │ │ ├── constructor_super.js │ │ │ │ ├── constructor_super.tree.json │ │ │ │ ├── invalid_super_access.failure.json │ │ │ │ ├── invalid_super_access.js │ │ │ │ ├── invalid_super_id.failure.json │ │ │ │ ├── invalid_super_id.js │ │ │ │ ├── invalid_super_not_inside_function.failure.json │ │ │ │ ├── invalid_super_not_inside_function.js │ │ │ │ ├── new_super.js │ │ │ │ ├── new_super.tree.json │ │ │ │ ├── super_computed.js │ │ │ │ ├── super_computed.tree.json │ │ │ │ ├── super_member.js │ │ │ │ └── super_member.tree.json │ │ │ ├── template-literals │ │ │ │ ├── after-switch.failure.json │ │ │ │ ├── after-switch.js │ │ │ │ ├── dollar-sign.js │ │ │ │ ├── dollar-sign.tree.json │ │ │ │ ├── escape-sequences.source.js │ │ │ │ ├── escape-sequences.tree.json │ │ │ │ ├── invalid-escape.failure.json │ │ │ │ ├── invalid-escape.js │ │ │ │ ├── invalid-hex-escape-sequence.failure.json │ │ │ │ ├── invalid-hex-escape-sequence.js │ │ │ │ ├── line-terminators.source.js │ │ │ │ ├── line-terminators.tree.json │ │ │ │ ├── literal-escape-sequences.source.js │ │ │ │ ├── literal-escape-sequences.tree.json │ │ │ │ ├── nested-function-with-object-pattern.js │ │ │ │ ├── nested-function-with-object-pattern.tree.json │ │ │ │ ├── new-expression.js │ │ │ │ ├── new-expression.tree.json │ │ │ │ ├── octal-literal.failure.json │ │ │ │ ├── octal-literal.js │ │ │ │ ├── strict-octal-literal.failure.json │ │ │ │ ├── strict-octal-literal.js │ │ │ │ ├── tagged-interpolation.js │ │ │ │ ├── tagged-interpolation.tree.json │ │ │ │ ├── tagged-nested-with-object-literal.js │ │ │ │ ├── tagged-nested-with-object-literal.tree.json │ │ │ │ ├── tagged.js │ │ │ │ ├── tagged.tree.json │ │ │ │ ├── unclosed-interpolation.failure.json │ │ │ │ ├── unclosed-interpolation.js │ │ │ │ ├── unclosed-nested.failure.json │ │ │ │ ├── unclosed-nested.js │ │ │ │ ├── unclosed.failure.json │ │ │ │ ├── unclosed.js │ │ │ │ ├── untagged.js │ │ │ │ └── untagged.tree.json │ │ │ ├── unicode-code-point-escape-sequence │ │ │ │ ├── migrated_0000.source.js │ │ │ │ ├── migrated_0000.tree.json │ │ │ │ ├── migrated_0001.source.js │ │ │ │ ├── migrated_0001.tree.json │ │ │ │ ├── migrated_0002.source.js │ │ │ │ └── migrated_0002.tree.json │ │ │ └── yield │ │ │ │ ├── invalid-yield-binding-property.failure.json │ │ │ │ ├── invalid-yield-binding-property.js │ │ │ │ ├── invalid-yield-expression.failure.json │ │ │ │ ├── invalid-yield-expression.js │ │ │ │ ├── invalid-yield-generator-arrow-default.failure.json │ │ │ │ ├── invalid-yield-generator-arrow-default.js │ │ │ │ ├── invalid-yield-generator-arrow-parameter.failure.json │ │ │ │ ├── invalid-yield-generator-arrow-parameter.js │ │ │ │ ├── invalid-yield-generator-arrow-parameters.failure.json │ │ │ │ ├── invalid-yield-generator-arrow-parameters.js │ │ │ │ ├── invalid-yield-generator-catch.failure.json │ │ │ │ ├── invalid-yield-generator-catch.js │ │ │ │ ├── invalid-yield-generator-declaration.failure.json │ │ │ │ ├── invalid-yield-generator-declaration.js │ │ │ │ ├── invalid-yield-generator-export-default.module.failure.json │ │ │ │ ├── invalid-yield-generator-export-default.module.js │ │ │ │ ├── invalid-yield-generator-expression-name.failure.json │ │ │ │ ├── invalid-yield-generator-expression-name.js │ │ │ │ ├── invalid-yield-generator-expression-parameter.failure.json │ │ │ │ ├── invalid-yield-generator-expression-parameter.js │ │ │ │ ├── invalid-yield-generator-expression-rest.failure.json │ │ │ │ ├── invalid-yield-generator-expression-rest.js │ │ │ │ ├── invalid-yield-generator-function-declaration.failure.json │ │ │ │ ├── invalid-yield-generator-function-declaration.js │ │ │ │ ├── invalid-yield-generator-lexical-declaration.failure.json │ │ │ │ ├── invalid-yield-generator-lexical-declaration.js │ │ │ │ ├── invalid-yield-generator-member-expression.failure.json │ │ │ │ ├── invalid-yield-generator-member-expression.js │ │ │ │ ├── invalid-yield-generator-parameter.failure.json │ │ │ │ ├── invalid-yield-generator-parameter.js │ │ │ │ ├── invalid-yield-generator-rest.failure.json │ │ │ │ ├── invalid-yield-generator-rest.js │ │ │ │ ├── invalid-yield-generator-strict-function-expression.failure.json │ │ │ │ ├── invalid-yield-generator-strict-function-expression.js │ │ │ │ ├── invalid-yield-generator-strict-function-parameter.failure.json │ │ │ │ ├── invalid-yield-generator-strict-function-parameter.js │ │ │ │ ├── invalid-yield-generator-variable-declaration.failure.json │ │ │ │ ├── invalid-yield-generator-variable-declaration.js │ │ │ │ ├── invalid-yield-object-methods.js │ │ │ │ ├── invalid-yield-object-methods.tree.json │ │ │ │ ├── invalid-yield-object-property-getter.js │ │ │ │ ├── invalid-yield-object-property-getter.tree.json │ │ │ │ ├── invalid-yield-object-property-setter.js │ │ │ │ ├── invalid-yield-object-property-setter.tree.json │ │ │ │ ├── invalid-yield-strict-array-pattern.failure.json │ │ │ │ ├── invalid-yield-strict-array-pattern.js │ │ │ │ ├── invalid-yield-strict-arrow-parameter-default.failure.json │ │ │ │ ├── invalid-yield-strict-arrow-parameter-default.js │ │ │ │ ├── invalid-yield-strict-arrow-parameter-name.failure.json │ │ │ │ ├── invalid-yield-strict-arrow-parameter-name.js │ │ │ │ ├── invalid-yield-strict-binding-element.failure.json │ │ │ │ ├── invalid-yield-strict-binding-element.js │ │ │ │ ├── invalid-yield-strict-catch-parameter.failure.json │ │ │ │ ├── invalid-yield-strict-catch-parameter.js │ │ │ │ ├── invalid-yield-strict-formal-parameter.failure.json │ │ │ │ ├── invalid-yield-strict-formal-parameter.js │ │ │ │ ├── invalid-yield-strict-function-declaration.failure.json │ │ │ │ ├── invalid-yield-strict-function-declaration.js │ │ │ │ ├── invalid-yield-strict-function-expression.failure.json │ │ │ │ ├── invalid-yield-strict-function-expression.js │ │ │ │ ├── invalid-yield-strict-identifier.failure.json │ │ │ │ ├── invalid-yield-strict-identifier.js │ │ │ │ ├── invalid-yield-strict-lexical-declaration.failure.json │ │ │ │ ├── invalid-yield-strict-lexical-declaration.js │ │ │ │ ├── invalid-yield-strict-rest-parameter.failure.json │ │ │ │ ├── invalid-yield-strict-rest-parameter.js │ │ │ │ ├── invalid-yield-strict-variable-declaration.failure.json │ │ │ │ ├── invalid-yield-strict-variable-declaration.js │ │ │ │ ├── ternary-yield.js │ │ │ │ ├── ternary-yield.tree.json │ │ │ │ ├── yield-arg-array.js │ │ │ │ ├── yield-arg-array.tree.json │ │ │ │ ├── yield-arg-bitnot.js │ │ │ │ ├── yield-arg-bitnot.tree.json │ │ │ │ ├── yield-arg-class.js │ │ │ │ ├── yield-arg-class.tree.json │ │ │ │ ├── yield-arg-delete.js │ │ │ │ ├── yield-arg-delete.tree.json │ │ │ │ ├── yield-arg-function.js │ │ │ │ ├── yield-arg-function.tree.json │ │ │ │ ├── yield-arg-group.js │ │ │ │ ├── yield-arg-group.tree.json │ │ │ │ ├── yield-arg-let.js │ │ │ │ ├── yield-arg-let.tree.json │ │ │ │ ├── yield-arg-minus.js │ │ │ │ ├── yield-arg-minus.tree.json │ │ │ │ ├── yield-arg-minusminus.js │ │ │ │ ├── yield-arg-minusminus.tree.json │ │ │ │ ├── yield-arg-new.js │ │ │ │ ├── yield-arg-new.tree.json │ │ │ │ ├── yield-arg-not.js │ │ │ │ ├── yield-arg-not.tree.json │ │ │ │ ├── yield-arg-object.js │ │ │ │ ├── yield-arg-object.tree.json │ │ │ │ ├── yield-arg-plus.js │ │ │ │ ├── yield-arg-plus.tree.json │ │ │ │ ├── yield-arg-plusplus.js │ │ │ │ ├── yield-arg-plusplus.tree.json │ │ │ │ ├── yield-arg-regexp1.js │ │ │ │ ├── yield-arg-regexp1.tree.json │ │ │ │ ├── yield-arg-regexp2.js │ │ │ │ ├── yield-arg-regexp2.tree.json │ │ │ │ ├── yield-arg-super.js │ │ │ │ ├── yield-arg-super.tree.json │ │ │ │ ├── yield-arg-this.js │ │ │ │ ├── yield-arg-this.tree.json │ │ │ │ ├── yield-arg-typeof.js │ │ │ │ ├── yield-arg-typeof.tree.json │ │ │ │ ├── yield-arg-void.js │ │ │ │ ├── yield-arg-void.tree.json │ │ │ │ ├── yield-array-pattern.js │ │ │ │ ├── yield-array-pattern.tree.json │ │ │ │ ├── yield-arrow-concise-body.js │ │ │ │ ├── yield-arrow-concise-body.tree.json │ │ │ │ ├── yield-arrow-function-body.js │ │ │ │ ├── yield-arrow-function-body.tree.json │ │ │ │ ├── yield-arrow-parameter-default.js │ │ │ │ ├── yield-arrow-parameter-default.tree.json │ │ │ │ ├── yield-arrow-parameter-name.js │ │ │ │ ├── yield-arrow-parameter-name.tree.json │ │ │ │ ├── yield-binding-element.js │ │ │ │ ├── yield-binding-element.tree.json │ │ │ │ ├── yield-binding-property.js │ │ │ │ ├── yield-binding-property.tree.json │ │ │ │ ├── yield-call-expression-property.js │ │ │ │ ├── yield-call-expression-property.tree.json │ │ │ │ ├── yield-catch-parameter.js │ │ │ │ ├── yield-catch-parameter.tree.json │ │ │ │ ├── yield-expression-precedence.js │ │ │ │ ├── yield-expression-precedence.tree.json │ │ │ │ ├── yield-function-declaration-formal-parameter.js │ │ │ │ ├── yield-function-declaration-formal-parameter.tree.json │ │ │ │ ├── yield-function-declaration.js │ │ │ │ ├── yield-function-declaration.tree.json │ │ │ │ ├── yield-function-expression-parameter.js │ │ │ │ ├── yield-function-expression-parameter.tree.json │ │ │ │ ├── yield-function-expression.js │ │ │ │ ├── yield-function-expression.tree.json │ │ │ │ ├── yield-generator-arrow-concise-body.js │ │ │ │ ├── yield-generator-arrow-concise-body.tree.json │ │ │ │ ├── yield-generator-arrow-default.js │ │ │ │ ├── yield-generator-arrow-default.tree.json │ │ │ │ ├── yield-generator-arrow-function-body.js │ │ │ │ ├── yield-generator-arrow-function-body.tree.json │ │ │ │ ├── yield-generator-declaration.js │ │ │ │ ├── yield-generator-declaration.tree.json │ │ │ │ ├── yield-generator-default-parameter.js │ │ │ │ ├── yield-generator-default-parameter.tree.json │ │ │ │ ├── yield-generator-function-expression.js │ │ │ │ ├── yield-generator-function-expression.tree.json │ │ │ │ ├── yield-generator-function-parameter.js │ │ │ │ ├── yield-generator-function-parameter.tree.json │ │ │ │ ├── yield-generator-method.js │ │ │ │ ├── yield-generator-method.tree.json │ │ │ │ ├── yield-generator-parameter-object-pattern.js │ │ │ │ ├── yield-generator-parameter-object-pattern.tree.json │ │ │ │ ├── yield-lexical-declaration.js │ │ │ │ ├── yield-lexical-declaration.tree.json │ │ │ │ ├── yield-member-expression-property.js │ │ │ │ ├── yield-member-expression-property.tree.json │ │ │ │ ├── yield-method.js │ │ │ │ ├── yield-method.tree.json │ │ │ │ ├── yield-parameter-object-pattern.js │ │ │ │ ├── yield-parameter-object-pattern.tree.json │ │ │ │ ├── yield-rest-parameter.js │ │ │ │ ├── yield-rest-parameter.tree.json │ │ │ │ ├── yield-strict-binding-property.js │ │ │ │ ├── yield-strict-binding-property.tree.json │ │ │ │ ├── yield-strict-method.js │ │ │ │ ├── yield-strict-method.tree.json │ │ │ │ ├── yield-super-property.js │ │ │ │ ├── yield-super-property.tree.json │ │ │ │ ├── yield-variable-declaration.js │ │ │ │ ├── yield-variable-declaration.tree.json │ │ │ │ ├── yield-yield-expression-delegate.js │ │ │ │ ├── yield-yield-expression-delegate.tree.json │ │ │ │ ├── yield-yield-expression.js │ │ │ │ └── yield-yield-expression.tree.json │ │ │ ├── LICENSE.BSD │ │ │ └── foo.mjs │ │ └── es2015.test.mjs ├── labrat │ ├── index.js │ ├── index.test.js │ └── package.json ├── lang-python │ ├── convertToOhm.js │ ├── package.json │ └── python-peg-grammar-3.11.0.txt ├── ohm-js │ ├── CHANGELOG.md │ ├── dist │ │ ├── built-in-rules.js │ │ ├── ohm-grammar.js │ │ └── operations-and-attributes.js │ ├── extras │ │ ├── VisitorFamily.js │ │ ├── extractExamples.js │ │ ├── index.d.ts │ │ ├── index.mjs │ │ ├── ohm-with-examples.ohm │ │ ├── semantics-toAST.js │ │ └── storedAttributes.js │ ├── index.d.ts │ ├── index.mjs │ ├── package.json │ ├── rollup.config.js │ ├── scripts │ │ ├── bootstrap │ │ ├── data │ │ │ └── index.d.ts.template │ │ ├── generate-types.js │ │ ├── get-contributors │ │ ├── prebootstrap │ │ ├── prebuild.js │ │ ├── prepublishOnly │ │ └── update-contributors │ ├── src │ │ ├── Builder.js │ │ ├── CaseInsensitiveTerminal.js │ │ ├── Failure.js │ │ ├── Grammar.js │ │ ├── GrammarDecl.js │ │ ├── IndentationSensitive.js │ │ ├── InputStream.js │ │ ├── Interval.js │ │ ├── MatchResult.js │ │ ├── MatchState.js │ │ ├── Matcher.js │ │ ├── PosInfo.js │ │ ├── Semantics.js │ │ ├── Trace.js │ │ ├── UnicodeCategories.js │ │ ├── buildGrammar.js │ │ ├── built-in-rules.ohm │ │ ├── common.js │ │ ├── deferredInit.js │ │ ├── errors.js │ │ ├── findIndentation.js │ │ ├── grammarDeferredInit.js │ │ ├── main-kernel.js │ │ ├── main.js │ │ ├── makeRecipe.js │ │ ├── nodes.js │ │ ├── ohm-cmd.js │ │ ├── ohm-grammar.ohm │ │ ├── operations-and-attributes.ohm │ │ ├── pexprs-allowsSkippingPrecedingSpace.js │ │ ├── pexprs-assertAllApplicationsAreValid.js │ │ ├── pexprs-assertChoicesHaveUniformArity.js │ │ ├── pexprs-assertIteratedExprsAreNotNullable.js │ │ ├── pexprs-eval.js │ │ ├── pexprs-getArity.js │ │ ├── pexprs-introduceParams.js │ │ ├── pexprs-isNullable.js │ │ ├── pexprs-main.js │ │ ├── pexprs-outputRecipe.js │ │ ├── pexprs-substituteParams.js │ │ ├── pexprs-toArgumentNameList.js │ │ ├── pexprs-toDisplayString.js │ │ ├── pexprs-toFailure.js │ │ ├── pexprs-toString.js │ │ ├── pexprs.js │ │ ├── semanticsDeferredInit.js │ │ ├── util.js │ │ └── version.js │ └── test │ │ ├── _test-doc.js │ │ ├── arithmetic.ohm │ │ ├── data │ │ ├── arithmetic.ohm │ │ └── myGrammar.ohm │ │ ├── examples │ │ └── test-prettyPrint.js │ │ ├── extras │ │ ├── test-extractExamples.js │ │ ├── test-storedAttributes.js │ │ ├── test-toAST.js │ │ └── test-visitorFamily.js │ │ ├── helpers │ │ └── testUtil.js │ │ ├── snapshots │ │ ├── test-grammar.js.md │ │ └── test-grammar.js.snap │ │ ├── test-built-in-rules.js │ │ ├── test-errors.js │ │ ├── test-examples.cjs │ │ ├── test-findIndentation.js │ │ ├── test-grammar.js │ │ ├── test-incremental.js │ │ ├── test-indentation-sensitive.js │ │ ├── test-input-stream.js │ │ ├── test-interval.js │ │ ├── test-main.js │ │ ├── test-ohm-syntax.js │ │ ├── test-parameterized-rules.js │ │ ├── test-pexprs.js │ │ ├── test-recipes.js │ │ ├── test-semantics.js │ │ ├── test-tracing.js │ │ └── test-util.js ├── packaging-tests │ ├── .gitignore │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ │ ├── greeting-esm.ohm │ │ ├── greeting-esm.ohm-bundle.d.ts │ │ ├── greeting-esm.ohm-bundle.js │ │ ├── greeting.ohm │ │ ├── index.rollup.js │ │ └── index.webpack.js │ ├── test │ │ ├── test-commonjs.cjs │ │ ├── test-esm.mjs │ │ ├── test-ts.ts │ │ ├── test-typings.ts │ │ └── test-umd.cjs │ ├── tsconfig.esm.json │ ├── tsconfig.json │ └── webpack.config.js └── wasm │ ├── .gitignore │ ├── .mise.toml │ ├── Makefile │ ├── TODO.md │ ├── package.json │ ├── runtime │ └── ohmRuntime.ts │ ├── scripts │ ├── bundlewasm.ts │ └── modparse.ts │ ├── src │ └── index.js │ └── test │ ├── data │ ├── _es5.js │ ├── _es5.wasm │ └── _html5shiv-3.7.3.js │ ├── go │ ├── README.md │ ├── cst.go │ ├── go.mod │ ├── go.sum │ ├── matcher.go │ └── testmain.go │ ├── test-es5.js │ └── test-wasm.js ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── release-please-config.json └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules/** 2 | **/third_party/** 3 | **/testdata/** 4 | **/test/data/** 5 | **/dist/* 6 | *.ohm-bundle.* 7 | ava-ts.config.js 8 | visualizer/assets/** 9 | packages/cli/src/helpers/generateTypes.test.js 10 | packages/wasm/runtime/** 11 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/test/data/* 2 | *.css 3 | *.html 4 | *.ohm-bundle.* 5 | dist 6 | pnpm-lock.yaml 7 | testdata 8 | third_party 9 | visualizer 10 | packages/wasm/runtime/** 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "arrowParens": "avoid", 6 | "printWidth": 95 7 | } 8 | -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages/ohm-js": "17.0.4" 3 | } 4 | -------------------------------------------------------------------------------- /bin/es5bench: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT=$(npm prefix) 4 | cd $(mktemp -d) 5 | curl --silent https://unpkg.com/ohm-js@15.3.0/dist/ohm.js -o ohm-es5.js 6 | node "$ROOT/examples/ecmascript/compile.js" -b "ohm-es5.js" > /dev/null 7 | -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt10@2x-87.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt10@2x-87.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt1@2x-78.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt1@2x-78.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt2@2x-79.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt2@2x-79.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt3@2x-80.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt3@2x-80.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt4@2x-81.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt4@2x-81.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt5@2x-82.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt5@2x-82.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt6@2x-83.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt6@2x-83.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt7@2x-84.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt7@2x-84.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt8@2x-85.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt8@2x-85.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/mt9@2x-86.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/mt9@2x-86.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/st0-997.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/st0-997.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Data/st1-1189.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Data/st1-1189.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/Index.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Index.zip -------------------------------------------------------------------------------- /doc/images/diagrams.key/Metadata/DocumentIdentifier: -------------------------------------------------------------------------------- 1 | C300A33F-3A62-4A60-B605-E37A516579F4 -------------------------------------------------------------------------------- /doc/images/diagrams.key/Metadata/Properties.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/Metadata/Properties.plist -------------------------------------------------------------------------------- /doc/images/diagrams.key/preview-micro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/preview-micro.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/preview-web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/preview-web.jpg -------------------------------------------------------------------------------- /doc/images/diagrams.key/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/diagrams.key/preview.jpg -------------------------------------------------------------------------------- /doc/images/instantiating-grammars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/instantiating-grammars.png -------------------------------------------------------------------------------- /doc/images/matching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/matching.png -------------------------------------------------------------------------------- /doc/images/quick-ref-basic-syntax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/quick-ref-basic-syntax.png -------------------------------------------------------------------------------- /doc/images/visualizer-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/visualizer-small.png -------------------------------------------------------------------------------- /doc/images/visualizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/doc/images/visualizer.png -------------------------------------------------------------------------------- /doc/quick-reference.md: -------------------------------------------------------------------------------- 1 | # Quick reference 2 | 3 | ![Basic syntax](./images/quick-ref-basic-syntax.png) 4 | -------------------------------------------------------------------------------- /examples/csv/csv.ohm: -------------------------------------------------------------------------------- 1 | CSV { 2 | csv = row (eol ~end row)* eol? 3 | row = col ("," col)* 4 | col = colChar* 5 | colChar = ~(eol | ",") any 6 | eol = "\r"? "\n" 7 | } 8 | -------------------------------------------------------------------------------- /examples/ecmascript/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./src/es5'); 4 | -------------------------------------------------------------------------------- /examples/ecmascript/src/testdata/test.es6: -------------------------------------------------------------------------------- 1 | /*eslint-disable */ 2 | 3 | var add = (arg1, arg2) => { 4 | return arg1 + arg2; 5 | }; 6 | var obj = { 7 | foo: () => 'foo:' + this, 8 | blah: x => function() { return '' + this; } 9 | }; 10 | [1, 2, 3].forEach(x => x + 1, this); 11 | -------------------------------------------------------------------------------- /examples/indentation-sensitive/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/markdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "type": "module", 6 | "dependencies": { 7 | "ohm-js": "^17.0.0" 8 | }, 9 | "devDependencies": { 10 | "ava": "^6.0.0" 11 | }, 12 | "scripts": { 13 | "test": "ava" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/markdown/snapshots/test/test-markdown.mjs.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/examples/markdown/snapshots/test/test-markdown.mjs.snap -------------------------------------------------------------------------------- /examples/markdown/test/snapshots/test-markdown.mjs.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/examples/markdown/test/snapshots/test-markdown.mjs.snap -------------------------------------------------------------------------------- /examples/markdown/test/test-markdown.mjs: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import test from 'ava'; 3 | 4 | import {parseMarkdown} from '../markdown.mjs'; 5 | 6 | test('parsing markdown', t => { 7 | const source = fs.readFileSync('test/data/test.md'); 8 | t.snapshot(parseMarkdown(source)); 9 | }); 10 | -------------------------------------------------------------------------------- /examples/math/parens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/examples/math/parens.png -------------------------------------------------------------------------------- /examples/nl-datalog-syntax/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6 4 | }, 5 | "rules": { 6 | "no-unused-vars": "off" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/operators/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/operators/test/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/simple-lisp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ohm-example-simple-lisp", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "ohm-js": "^17.0.0" 7 | }, 8 | "devDependencies": { 9 | "ava": "^6.0.0" 10 | }, 11 | "scripts": { 12 | "test": "ava" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/typescript/.gitignore: -------------------------------------------------------------------------------- 1 | *.ohm-bundle.* 2 | -------------------------------------------------------------------------------- /examples/typescript/src/arithmetic.test.ts: -------------------------------------------------------------------------------- 1 | import {test} from 'uvu'; 2 | import * as assert from 'uvu/assert'; 3 | 4 | import {evaluate} from './arithmetic'; 5 | 6 | test('basic', () => { 7 | assert.is(evaluate('(3 + 4) * 5'), 35); 8 | assert.is(evaluate('pi'), Math.PI); 9 | }); 10 | 11 | test.run(); 12 | -------------------------------------------------------------------------------- /examples/typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src/**/*.ts"], 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "target": "ES2015", 6 | "module": "commonjs", 7 | "strict": true, 8 | "esModuleInterop": true, 9 | "skipLibCheck": true, 10 | "forceConsistentCasingInFileNames": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['../.eslintrc.cjs'], 3 | parserOptions: { 4 | ecmaVersion: 11, // es2020 5 | sourceType: 'module' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cli/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-env node */ 3 | 4 | import {ohmCli} from './src/cli.js'; 5 | ohmCli(process.argv.slice(2)); 6 | -------------------------------------------------------------------------------- /packages/cli/src/commands/generateBundles/index.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/packages/cli/src/commands/generateBundles/index.test.js.snap -------------------------------------------------------------------------------- /packages/cli/src/commands/generateBundles/testdata/e/f/g.ohm: -------------------------------------------------------------------------------- 1 | G { x = "G" } 2 | G2 <: G { x := "G2" } 3 | -------------------------------------------------------------------------------- /packages/cli/src/commands/index.js: -------------------------------------------------------------------------------- 1 | import generateBundlesCommand from './generateBundles/index.js'; 2 | import matchCommand from './match.js'; 3 | 4 | export default [generateBundlesCommand, matchCommand]; 5 | -------------------------------------------------------------------------------- /packages/cli/src/helpers/generateTypes.d.ts: -------------------------------------------------------------------------------- 1 | import {Grammar, Namespace} from 'ohm-js'; 2 | 3 | declare function generateTypes(grammars: Namespace): string; 4 | declare function getActionDecls(grammar: Grammar): string[]; 5 | -------------------------------------------------------------------------------- /packages/cli/src/helpers/generateTypes.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/packages/cli/src/helpers/generateTypes.test.js.snap -------------------------------------------------------------------------------- /packages/cli/src/testdata/words-fails.txt: -------------------------------------------------------------------------------- 1 | This isn't valid. 2 | -------------------------------------------------------------------------------- /packages/cli/src/testdata/words-succeeds.txt: -------------------------------------------------------------------------------- 1 | tra, la, la 2 | -------------------------------------------------------------------------------- /packages/cli/src/testdata/words.ohm: -------------------------------------------------------------------------------- 1 | Words { 2 | Words = ListOf 3 | word = letter+ 4 | } 5 | -------------------------------------------------------------------------------- /packages/es-grammars/README.md: -------------------------------------------------------------------------------- 1 | # @ohm-js/es-grammars 2 | 3 | Ohm grammars for modern versions of ECMAScript/JavaScript (ES2015+). 4 | 5 | ## Example 6 | 7 | ```js 8 | import {es2020} from '@ohm-js/es-grammars'; 9 | es2020.match('() => 3').succeeded(); // true 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/array-binding-pattern-01.js: -------------------------------------------------------------------------------- 1 | ([a]) => [0]; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/array-binding-pattern-02.js: -------------------------------------------------------------------------------- 1 | ([a, b])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/array-binding-pattern-03.js: -------------------------------------------------------------------------------- 1 | ([a, ...b])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/array-binding-pattern-empty.js: -------------------------------------------------------------------------------- 1 | ([])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/elision.js: -------------------------------------------------------------------------------- 1 | ([,,])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/invalid-dup-param.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/invalid-dup-param.js: -------------------------------------------------------------------------------- 1 | ([a,[b],...b])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/invalid-elision-after-rest.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/array-binding-pattern/invalid-elision-after-rest.js: -------------------------------------------------------------------------------- 1 | ([a,...b,])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-rest-forgetting-comma.failure.json: -------------------------------------------------------------------------------- 1 | {"index":3,"lineNumber":1,"column":4,"message":"Error: Line 1: Unexpected token ...","description":"Unexpected token ..."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-rest-forgetting-comma.js: -------------------------------------------------------------------------------- 1 | (a ...b) => 0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-with-multiple-arg-and-rest.js: -------------------------------------------------------------------------------- 1 | (a, b, ...c) => 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-with-multiple-rest.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Rest parameter must be last formal parameter","description":"Rest parameter must be last formal parameter"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-with-multiple-rest.js: -------------------------------------------------------------------------------- 1 | (...a, ...b) => 0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/arrow-with-only-rest.js: -------------------------------------------------------------------------------- 1 | (...a) => 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/concise-body-in.js: -------------------------------------------------------------------------------- 1 | for (() => { 2 | x in y; 3 | }; ;); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-duplicated-names-rest-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-duplicated-names-rest-parameter.js: -------------------------------------------------------------------------------- 1 | (a,...[a]) => 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-duplicated-params.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-duplicated-params.js: -------------------------------------------------------------------------------- 1 | (x, x) => y; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-line-terminator-arrow.failure.json: -------------------------------------------------------------------------------- 1 | {"index":3,"lineNumber":2,"column":4,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-line-terminator-arrow.js: -------------------------------------------------------------------------------- 1 | () 2 | => 42 3 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-param-strict-mode.failure.json: -------------------------------------------------------------------------------- 1 | {"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Parameter name eval or arguments is not allowed in strict mode","description":"Parameter name eval or arguments is not allowed in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/invalid-param-strict-mode.js: -------------------------------------------------------------------------------- 1 | eval => {"use strict"}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0000.js: -------------------------------------------------------------------------------- 1 | () => 'test'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0001.js: -------------------------------------------------------------------------------- 1 | e => 'test'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0002.js: -------------------------------------------------------------------------------- 1 | e => 'test'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0003.js: -------------------------------------------------------------------------------- 1 | (a, b) => 'test'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0004.js: -------------------------------------------------------------------------------- 1 | e => { 2 | 42; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0005.js: -------------------------------------------------------------------------------- 1 | e => ({property: 42}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0006.js: -------------------------------------------------------------------------------- 1 | e => { 2 | 42; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0007.js: -------------------------------------------------------------------------------- 1 | (a, b) => { 2 | 42; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0008.js: -------------------------------------------------------------------------------- 1 | (x=1) => x * x; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0009.js: -------------------------------------------------------------------------------- 1 | eval => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0010.js: -------------------------------------------------------------------------------- 1 | arguments => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0011.js: -------------------------------------------------------------------------------- 1 | a => 00; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0012.js: -------------------------------------------------------------------------------- 1 | (eval, a) => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0013.js: -------------------------------------------------------------------------------- 1 | (eval = 10) => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0014.js: -------------------------------------------------------------------------------- 1 | (eval, a = 10) => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0015.js: -------------------------------------------------------------------------------- 1 | (x => x); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0016.js: -------------------------------------------------------------------------------- 1 | x => y => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0017.js: -------------------------------------------------------------------------------- 1 | x => ((y, z) => (x, y, z)); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0018.js: -------------------------------------------------------------------------------- 1 | foo(() => {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0019.js: -------------------------------------------------------------------------------- 1 | foo((x, y) => {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/migrated_0020.js: -------------------------------------------------------------------------------- 1 | sun => earth; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/non-arrow-param-followed-by-arrow.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/non-arrow-param-followed-by-arrow.js: -------------------------------------------------------------------------------- 1 | ((a)) => 0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/non-arrow-param-followed-by-rest.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Unexpected token ...","description":"Unexpected token ..."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/non-arrow-param-followed-by-rest.js: -------------------------------------------------------------------------------- 1 | ((a),...b) => 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-member-expr.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-member-expr.js: -------------------------------------------------------------------------------- 1 | ({a:b[0]})=>0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-method-in-pattern.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-method-in-pattern.js: -------------------------------------------------------------------------------- 1 | ({get a(){}}) => 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-nested-param.failure.json: -------------------------------------------------------------------------------- 1 | {"index":50,"lineNumber":1,"column":51,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-nested-param.js: -------------------------------------------------------------------------------- 1 | ([[[[[[[[[[[[[[[[[[[[{a:b[0]}]]]]]]]]]]]]]]]]]]]])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.failure.json: -------------------------------------------------------------------------------- 1 | {"index":3,"lineNumber":1,"column":4,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.js: -------------------------------------------------------------------------------- 1 | ({}=>0) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/nested-cover-grammar.js: -------------------------------------------------------------------------------- 1 | ([[[[[[[[[[[[[[[[[[[[{a=b}]]]]]]]]]]]]]]]]]]]])=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/object-binding-pattern-01.js: -------------------------------------------------------------------------------- 1 | ({a, b=b, a: c, [a]: [d]})=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/object-binding-pattern/object-binding-pattern-empty.js: -------------------------------------------------------------------------------- 1 | ({})=>0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/param-with-rest-without-arrow.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token +","description":"Unexpected token +"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/param-with-rest-without-arrow.js: -------------------------------------------------------------------------------- 1 | (b, ...a) + 1 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/rest-without-arrow.failure.json: -------------------------------------------------------------------------------- 1 | {"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected token +","description":"Unexpected token +"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/arrow-function/rest-without-arrow.js: -------------------------------------------------------------------------------- 1 | (...a) + 1 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0000.js: -------------------------------------------------------------------------------- 1 | 0b0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0001.js: -------------------------------------------------------------------------------- 1 | 0b1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0002.js: -------------------------------------------------------------------------------- 1 | 0b10; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0003.js: -------------------------------------------------------------------------------- 1 | 0B0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0004.js: -------------------------------------------------------------------------------- 1 | 0B1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binary-integer-literal/migrated_0005.js: -------------------------------------------------------------------------------- 1 | 0B10; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/dupe-param.failure.json: -------------------------------------------------------------------------------- 1 | {"index":31,"lineNumber":2,"column":18,"message":"Error: Line 2: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/dupe-param.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function a([a,a]){ } 3 | function a([a,...a]){ } 4 | function a([{a},...a]){ } -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/elision.js: -------------------------------------------------------------------------------- 1 | const [a] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/empty-pattern-catch-param.js: -------------------------------------------------------------------------------- 1 | try { } catch ([]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/empty-pattern-fn.js: -------------------------------------------------------------------------------- 1 | function a([]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/empty-pattern-lexical.js: -------------------------------------------------------------------------------- 1 | let [] = []; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/empty-pattern-var.js: -------------------------------------------------------------------------------- 1 | let [] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/for-let-let.js: -------------------------------------------------------------------------------- 1 | for (let [x = let];;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/hole.js: -------------------------------------------------------------------------------- 1 | const [a,, b]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/invalid-strict-for-let-let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/invalid-strict-for-let-let.js: -------------------------------------------------------------------------------- 1 | "use strict"; for (let [x = let];;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/nested-pattern.js: -------------------------------------------------------------------------------- 1 | let [[]]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/patterned-catch-dupe.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 19, 3 | "lineNumber": 1, 4 | "column": 20, 5 | "message": "Error: Line 1: Duplicate binding a", 6 | "description": "Duplicate binding a" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/patterned-catch-dupe.js: -------------------------------------------------------------------------------- 1 | try {} catch ([a,a]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/patterned-catch.js: -------------------------------------------------------------------------------- 1 | try {} catch ([a, b, {c, d: e=0, [f]: g=0, h=i}]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/rest-element-array-pattern.js: -------------------------------------------------------------------------------- 1 | let [...[x]] = y 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/rest-element-object-pattern.js: -------------------------------------------------------------------------------- 1 | var [...{x}] = y 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/rest.elision.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 9, 3 | "lineNumber": 1, 4 | "column": 10, 5 | "message": "Error: Line 1: Unexpected token ,", 6 | "description": "Unexpected token ," 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/rest.elision.js: -------------------------------------------------------------------------------- 1 | let [...a,] = 0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/rest.js: -------------------------------------------------------------------------------- 1 | const [...a] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/tailing-hold.js: -------------------------------------------------------------------------------- 1 | const [a,, ]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/var-for-in.js: -------------------------------------------------------------------------------- 1 | for (var [x, y] in z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/var_let_array.js: -------------------------------------------------------------------------------- 1 | var [let] = answer; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/with-default-catch-param-fail.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 19, 3 | "lineNumber": 1, 4 | "column": 20, 5 | "message": "Error: Line 1: Unexpected token =", 6 | "description": "Unexpected token =" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/with-default-catch-param-fail.js: -------------------------------------------------------------------------------- 1 | try { } catch ([a] = []) { } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/with-default-catch-param.js: -------------------------------------------------------------------------------- 1 | try { } catch ([a = 0]) { } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/with-default-fn.js: -------------------------------------------------------------------------------- 1 | function a([a=0]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/array-pattern/with-object-pattern.js: -------------------------------------------------------------------------------- 1 | const [{a}] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/elision.js: -------------------------------------------------------------------------------- 1 | const {a} = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/empty-catch-param.js: -------------------------------------------------------------------------------- 1 | try { } catch ({}) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/empty-fn.js: -------------------------------------------------------------------------------- 1 | function a({}) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/empty-for-lex.js: -------------------------------------------------------------------------------- 1 | for (let {} in 0); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/empty-lexical.js: -------------------------------------------------------------------------------- 1 | let {} = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/empty-var.js: -------------------------------------------------------------------------------- 1 | let {} = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/for-let-let.js: -------------------------------------------------------------------------------- 1 | for (let {x: y = let};;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/invalid-strict-for-let-let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":31,"lineNumber":1,"column":32,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/invalid-strict-for-let-let.js: -------------------------------------------------------------------------------- 1 | "use strict"; for (let {x: y = let};;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/nested.js: -------------------------------------------------------------------------------- 1 | let {a: {}} = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/properties.js: -------------------------------------------------------------------------------- 1 | const {a, b=0, c: d, e: f=0, [g]: [h]}=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/binding-pattern/object-pattern/var-for-in.js: -------------------------------------------------------------------------------- 1 | for (var {x, y} in z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/invalid-labelled-class-declaration.js: -------------------------------------------------------------------------------- 1 | a: class B {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/invalid-setter-method-rest.js: -------------------------------------------------------------------------------- 1 | class X { set f(...y) {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0000.js: -------------------------------------------------------------------------------- 1 | class A {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0001.js: -------------------------------------------------------------------------------- 1 | class A extends 0 {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0002.js: -------------------------------------------------------------------------------- 1 | class A {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0003.js: -------------------------------------------------------------------------------- 1 | class A {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0004.js: -------------------------------------------------------------------------------- 1 | class A { 2 | a() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0005.js: -------------------------------------------------------------------------------- 1 | class A { 2 | a() {}b() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0006.js: -------------------------------------------------------------------------------- 1 | class A { 2 | a() {}b() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0007.js: -------------------------------------------------------------------------------- 1 | class A { 2 | a() {}b() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0008.js: -------------------------------------------------------------------------------- 1 | class A { 2 | a() {}b() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0009.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0010.js: -------------------------------------------------------------------------------- 1 | class A { 2 | get a() {} set b(c) {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0011.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static a() {} static get a() {} static set a(b) {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0012.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static a() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0013.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static [a]() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0014.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static [a]() {} static [b]() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0015.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static static() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0016.js: -------------------------------------------------------------------------------- 1 | var x = class A extends 0 {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0017.js: -------------------------------------------------------------------------------- 1 | class A { 2 | prototype() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0018.js: -------------------------------------------------------------------------------- 1 | class A { 2 | constructor() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0019.js: -------------------------------------------------------------------------------- 1 | class A { 2 | 'constructor'() {} ['constructor']() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0020.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static constructor() {} static constructor() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0021.js: -------------------------------------------------------------------------------- 1 | class A { 2 | static ['prototype']() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0022.js: -------------------------------------------------------------------------------- 1 | (class {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0023.js: -------------------------------------------------------------------------------- 1 | (class A {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0024.js: -------------------------------------------------------------------------------- 1 | (class extends 0 {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0025.js: -------------------------------------------------------------------------------- 1 | (class A extends 0 {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/class/migrated_0026.js: -------------------------------------------------------------------------------- 1 | class A {a(eval){}} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/default-parameter-value/migrated_0000.js: -------------------------------------------------------------------------------- 1 | x = function(y = 1) {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/default-parameter-value/migrated_0001.js: -------------------------------------------------------------------------------- 1 | function f(a = 1) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/default-parameter-value/migrated_0002.js: -------------------------------------------------------------------------------- 1 | x = {f(a=1) {}}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/dup-assignment.js: -------------------------------------------------------------------------------- 1 | [a, a,, ...a]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/elision.js: -------------------------------------------------------------------------------- 1 | [,,]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/member-expr-in-rest.js: -------------------------------------------------------------------------------- 1 | [...a[0]] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/nested-assignment.js: -------------------------------------------------------------------------------- 1 | [a, b=0, [c, ...a[0]]={}]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/nested-cover-grammar.js: -------------------------------------------------------------------------------- 1 | [{a=b}=0]; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/array-pattern/simple-assignment.js: -------------------------------------------------------------------------------- 1 | [a] = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/invalid-cover-grammar.failure.json: -------------------------------------------------------------------------------- 1 | {"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Unexpected token =","description":"Unexpected token ="} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/invalid-cover-grammar.js: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[[{a=b}]]]]]]]]]]]]]]]]]]]] 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/invalid-group-assignment.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Invalid left-hand side in assignment","description":"Invalid left-hand side in assignment"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/invalid-group-assignment.js: -------------------------------------------------------------------------------- 1 | (a,b)=(c,d); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/empty-object-pattern-assignment.js: -------------------------------------------------------------------------------- 1 | ({} = 0); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-lhs-01.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: Invalid left-hand side in assignment","description":"Invalid left-hand side in assignment"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-lhs-01.js: -------------------------------------------------------------------------------- 1 | ({a:this}=0) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-lhs-02.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Invalid left-hand side in assignment","description":"Invalid left-hand side in assignment"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-lhs-02.js: -------------------------------------------------------------------------------- 1 | ({a: this} = 0); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-pattern-with-method.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: Invalid left-hand side in assignment","description":"Invalid left-hand side in assignment"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/invalid-pattern-with-method.js: -------------------------------------------------------------------------------- 1 | ({get a(){}})=0 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/nested-cover-grammar.js: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[[{a=b[0]}]]]]]]]]]]]]]]]]]]]]=0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/destructuring-assignment/object-pattern/object-pattern-assignment.js: -------------------------------------------------------------------------------- 1 | ({ 2 | a, 3 | a: a, 4 | a: a=a, 5 | [a]: {a}, 6 | a: some_call()[a], 7 | a: this.a, 8 | } = 0); 9 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-const-number.js: -------------------------------------------------------------------------------- 1 | export const foo = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-array.js: -------------------------------------------------------------------------------- 1 | export default []; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-assignment.module.js: -------------------------------------------------------------------------------- 1 | export default a = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-class.js: -------------------------------------------------------------------------------- 1 | export default class {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-expression.js: -------------------------------------------------------------------------------- 1 | export default (1 + 2); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-function.js: -------------------------------------------------------------------------------- 1 | export default function () {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-named-class.js: -------------------------------------------------------------------------------- 1 | export default class foo {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-named-function.js: -------------------------------------------------------------------------------- 1 | export default function foo() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-number.js: -------------------------------------------------------------------------------- 1 | export default 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-object.js: -------------------------------------------------------------------------------- 1 | export default { foo: 1 }; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-default-value.js: -------------------------------------------------------------------------------- 1 | export default foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-batch.js: -------------------------------------------------------------------------------- 1 | export * from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-default.js: -------------------------------------------------------------------------------- 1 | export {default} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-named-as-default.js: -------------------------------------------------------------------------------- 1 | export {foo as default} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-named-as-specifier.js: -------------------------------------------------------------------------------- 1 | export {foo as bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-named-as-specifiers.js: -------------------------------------------------------------------------------- 1 | export {foo as default, bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-specifier.js: -------------------------------------------------------------------------------- 1 | export {foo} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-from-specifiers.js: -------------------------------------------------------------------------------- 1 | export {foo, bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-function-declaration.js: -------------------------------------------------------------------------------- 1 | export function foo () {} false 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-function.js: -------------------------------------------------------------------------------- 1 | export function foo () {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-let-number.js: -------------------------------------------------------------------------------- 1 | export let foo = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-as-default.js: -------------------------------------------------------------------------------- 1 | export {foo as default}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-as-specifier.js: -------------------------------------------------------------------------------- 1 | export {foo as bar}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-as-specifiers.js: -------------------------------------------------------------------------------- 1 | export {foo as default, bar}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-empty.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-keyword-as-specifier.js: -------------------------------------------------------------------------------- 1 | export {try as bar}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-keyword-specifier.js: -------------------------------------------------------------------------------- 1 | export {try}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-specifier.js: -------------------------------------------------------------------------------- 1 | export {foo}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-specifiers-comma.js: -------------------------------------------------------------------------------- 1 | export {foo, bar,}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-named-specifiers.js: -------------------------------------------------------------------------------- 1 | export {foo, bar}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-var-anonymous-function.js: -------------------------------------------------------------------------------- 1 | export var foo = function () {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-var-number.js: -------------------------------------------------------------------------------- 1 | export var foo = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/export-var.js: -------------------------------------------------------------------------------- 1 | export var bar; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-batch-missing-from-clause.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-batch-missing-from-clause.module.js: -------------------------------------------------------------------------------- 1 | export * 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-batch-token.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Unexpected token +","description":"Unexpected token +"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-batch-token.module.js: -------------------------------------------------------------------------------- 1 | export * + 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default-equal.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected token =","description":"Unexpected token ="} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default-equal.module.js: -------------------------------------------------------------------------------- 1 | export default = 42 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default-token.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Unexpected token +","description":"Unexpected token +"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default-token.module.js: -------------------------------------------------------------------------------- 1 | export {default} + 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token from","description":"Unexpected token from"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-default.module.js: -------------------------------------------------------------------------------- 1 | export default from "foo" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-named-default.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 16, 3 | "lineNumber": 1, 4 | "column": 17, 5 | "message": "Error: Line 1: Unexpected token", 6 | "description": "Unexpected token" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/export-declaration/invalid-export-named-default.module.js: -------------------------------------------------------------------------------- 1 | export {default} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-array-pattern-let.js: -------------------------------------------------------------------------------- 1 | for (const [p, q] of r); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-array-pattern-var.js: -------------------------------------------------------------------------------- 1 | for (var [p, q] of r); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-array-pattern.js: -------------------------------------------------------------------------------- 1 | for ([p, q] of r); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-let.js: -------------------------------------------------------------------------------- 1 | for (x of let) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-object-pattern-const.js: -------------------------------------------------------------------------------- 1 | for (const {x, y} of z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-object-pattern-var.js: -------------------------------------------------------------------------------- 1 | for (var {x, y} of z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-object-pattern.js: -------------------------------------------------------------------------------- 1 | for ({x, y} of z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-with-const.js: -------------------------------------------------------------------------------- 1 | for (const y of list); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-with-let.js: -------------------------------------------------------------------------------- 1 | for (const z of list); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of-with-var.js: -------------------------------------------------------------------------------- 1 | for (var x of list); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/for-of.js: -------------------------------------------------------------------------------- 1 | for (p of q); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-assign-for-of.failure.json: -------------------------------------------------------------------------------- 1 | {"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Invalid left-hand side in for-loop","description":"Invalid left-hand side in for-loop"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-assign-for-of.js: -------------------------------------------------------------------------------- 1 | for (x=0 of y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-const-init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-const-init.js: -------------------------------------------------------------------------------- 1 | for (const x = 1 of y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-decl-cls.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected token [object Object]","description":"Unexpected token [object Object]"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-decl-cls.js: -------------------------------------------------------------------------------- 1 | for (var x of []) class C {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-for-of-array-pattern.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-for-of-array-pattern.js: -------------------------------------------------------------------------------- 1 | for (var [p]=q of r); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-for-of-object-pattern.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-for-of-object-pattern.js: -------------------------------------------------------------------------------- 1 | for (var {x} = y of z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-let-init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-let-init.js: -------------------------------------------------------------------------------- 1 | for (let x = 1 of y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-lhs-init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: Invalid left-hand side in for-loop","description":"Invalid left-hand side in for-loop"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-lhs-init.js: -------------------------------------------------------------------------------- 1 | for (this of that); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-strict-for-of-let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":24,"lineNumber":1,"column":25,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-strict-for-of-let.js: -------------------------------------------------------------------------------- 1 | "use strict"; for (x of let) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-var-init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid-var-init.js: -------------------------------------------------------------------------------- 1 | for (var x = 1 of y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid_const_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid_const_let.js: -------------------------------------------------------------------------------- 1 | for (const let of y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid_let_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/invalid_let_let.js: -------------------------------------------------------------------------------- 1 | for (let let of x); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/let-of-of.js: -------------------------------------------------------------------------------- 1 | for (const of of xyz); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/unexpected-number.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: Missing initializer in const declaration","description":"Missing initializer in const declaration"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/for-of/unexpected-number.js: -------------------------------------------------------------------------------- 1 | for (const of 42); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-declaration-with-params.js: -------------------------------------------------------------------------------- 1 | function* foo(x, y, z) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-declaration-with-yield-delegate.js: -------------------------------------------------------------------------------- 1 | function* foo() { 2 | yield* 3; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-declaration-with-yield.js: -------------------------------------------------------------------------------- 1 | function* foo() { 2 | yield 3; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-declaration.js: -------------------------------------------------------------------------------- 1 | function* foo() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-expression-rest-param.js: -------------------------------------------------------------------------------- 1 | (function* (...x) {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-expression-with-params.js: -------------------------------------------------------------------------------- 1 | (function* (x, y, z) {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-expression-with-yield-delegate.js: -------------------------------------------------------------------------------- 1 | (function* (x, y, z) { 2 | yield* x; 3 | }); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-expression-with-yield.js: -------------------------------------------------------------------------------- 1 | (function* () { 2 | yield 3; 3 | }); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-expression.js: -------------------------------------------------------------------------------- 1 | (function* () {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-computed-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":21,"lineNumber":2,"column":7,"message":"Error: Line 2: Unexpected token *","description":"Unexpected token *"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-computed-name.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | { *[yield iter]() {} } 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-invalid-computed-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-invalid-computed-name.js: -------------------------------------------------------------------------------- 1 | ({ *[yield iter]() {} }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-params.js: -------------------------------------------------------------------------------- 1 | ({* foo(x, y, z) {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-yield-delegate.js: -------------------------------------------------------------------------------- 1 | ({* foo() { 2 | yield* 3; 3 | }}); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-yield-expression.js: -------------------------------------------------------------------------------- 1 | ({* foo() { 2 | yield 3; 3 | }}); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-yield-line-terminator.js: -------------------------------------------------------------------------------- 1 | ({* foo() { 2 | yield; 3 | 3; 4 | }}); 5 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method-with-yield.js: -------------------------------------------------------------------------------- 1 | ({* foo() { 2 | yield; 3 | }}); 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-method.js: -------------------------------------------------------------------------------- 1 | ({* foo() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-element.failure.json: -------------------------------------------------------------------------------- 1 | {"index":27,"lineNumber":2,"column":13,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-element.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function(x = yield 3) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-property-reserved.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-property-reserved.js: -------------------------------------------------------------------------------- 1 | (function*({yield}) {}) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-property.failure.json: -------------------------------------------------------------------------------- 1 | {"index":27,"lineNumber":2,"column":13,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-binding-property.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function({x: y = yield 3}) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-computed-property-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":27,"lineNumber":2,"column":13,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-computed-property-name.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function({[yield 3]: y}) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-binding-element.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":2,"column":14,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-binding-element.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function*(x = yield 3) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-binding-property.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":2,"column":14,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-binding-property.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function*({x: y = yield 3}) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-computed-property-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":2,"column":14,"message":"Error: Line 2: Unexpected token (","description":"Unexpected token ("} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/generator-parameter-invalid-computed-property-name.js: -------------------------------------------------------------------------------- 1 | (function*() { 2 | function*({[yield 3]: y}) {} 3 | }) 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/incomplete-yield-delegate.failure.json: -------------------------------------------------------------------------------- 1 | {"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/incomplete-yield-delegate.js: -------------------------------------------------------------------------------- 1 | (function*() { yield* }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/invalid-labelled-generator.js: -------------------------------------------------------------------------------- 1 | a: function *g() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/malformed-generator-method-2.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/malformed-generator-method-2.js: -------------------------------------------------------------------------------- 1 | class Foo { * } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/malformed-generator-method.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/malformed-generator-method.js: -------------------------------------------------------------------------------- 1 | ({ * }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/static-generator-method-with-computed-name.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static* [foo]() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/generator/static-generator-method.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static* foo() {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/dakuten_handakuten.js: -------------------------------------------------------------------------------- 1 | ゛+ ゜; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_all.js: -------------------------------------------------------------------------------- 1 | var \u{41}\u{42}\u{43}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_math_alef.js: -------------------------------------------------------------------------------- 1 | var \u{1EE00}; 2 | 3 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_math_dal_part.js: -------------------------------------------------------------------------------- 1 | var _\u{1EE03}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_math_kaf_lam.js: -------------------------------------------------------------------------------- 1 | var \u{1EE0A}\u{1EE0B}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_math_zain_start.js: -------------------------------------------------------------------------------- 1 | var \u{1EE06}_$; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_part.js: -------------------------------------------------------------------------------- 1 | var A\u{42}C; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/escaped_start.js: -------------------------------------------------------------------------------- 1 | var \u{41}BC; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/estimated.js: -------------------------------------------------------------------------------- 1 | let ℮; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/ethiopic_digits.js: -------------------------------------------------------------------------------- 1 | var _፩፪፫፬፭፮፯፰፱; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid-hex-escape-sequence.failure.json: -------------------------------------------------------------------------------- 1 | {"index":3,"lineNumber":1,"column":4,"message":"Error: Line 1: Invalid hexadecimal escape sequence","description":"Invalid hexadecimal escape sequence"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid-hex-escape-sequence.js: -------------------------------------------------------------------------------- 1 | "\x{0}" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_escaped_surrogate_pairs.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_escaped_surrogate_pairs.js: -------------------------------------------------------------------------------- 1 | var \uD83B\uDE00 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_expression_await.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_expression_await.module.js: -------------------------------------------------------------------------------- 1 | export var answer = await + 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_function_await.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_function_await.module.js: -------------------------------------------------------------------------------- 1 | function await() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_id_smp.failure.json: -------------------------------------------------------------------------------- 1 | {"index":4,"lineNumber":1,"column":5,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_id_smp.js: -------------------------------------------------------------------------------- 1 | var 🀒 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_lone_surrogate.failure.json: -------------------------------------------------------------------------------- 1 | {"index":0,"lineNumber":1,"column":1,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_lone_surrogate.source.js: -------------------------------------------------------------------------------- 1 | var source = '\uD800!'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_var_await.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/invalid_var_await.module.js: -------------------------------------------------------------------------------- 1 | export var await; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/math_alef.js: -------------------------------------------------------------------------------- 1 | var 𞸀; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/math_dal_part.js: -------------------------------------------------------------------------------- 1 | var _𞸃; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/math_kaf_lam.js: -------------------------------------------------------------------------------- 1 | var 𞸊𞸋; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/math_zain_start.js: -------------------------------------------------------------------------------- 1 | var 𞸆_$; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/module_await.js: -------------------------------------------------------------------------------- 1 | await = 0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/valid_await.js: -------------------------------------------------------------------------------- 1 | var await; (await); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/weierstrass.js: -------------------------------------------------------------------------------- 1 | var ℘; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/identifier/weierstrass_weierstrass.js: -------------------------------------------------------------------------------- 1 | var ℘\u2118; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-default-and-named-specifiers.js: -------------------------------------------------------------------------------- 1 | import foo, {bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-default-and-namespace-specifiers.js: -------------------------------------------------------------------------------- 1 | import foo, * as bar from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-default-as.js: -------------------------------------------------------------------------------- 1 | import {default as foo} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-default.js: -------------------------------------------------------------------------------- 1 | import foo from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-jquery.js: -------------------------------------------------------------------------------- 1 | import $ from "jquery" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-module.js: -------------------------------------------------------------------------------- 1 | import "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-as-specifier.js: -------------------------------------------------------------------------------- 1 | import {bar as baz} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-as-specifiers.js: -------------------------------------------------------------------------------- 1 | import {bar as baz, xyz} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-empty.js: -------------------------------------------------------------------------------- 1 | import {} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-specifier.js: -------------------------------------------------------------------------------- 1 | import {bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-specifiers-comma.js: -------------------------------------------------------------------------------- 1 | import {bar, baz,} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-named-specifiers.js: -------------------------------------------------------------------------------- 1 | import {bar, baz} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-namespace-specifier.js: -------------------------------------------------------------------------------- 1 | import * as foo from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/import-null-as-nil.js: -------------------------------------------------------------------------------- 1 | import { null as nil } from "bar" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-boolean.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-boolean.module.js: -------------------------------------------------------------------------------- 1 | import { true } from "logic" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-after-named-after-default.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-after-named-after-default.module.js: -------------------------------------------------------------------------------- 1 | import foo, {bar}, foo from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-after-named.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-after-named.module.js: -------------------------------------------------------------------------------- 1 | import {bar}, foo from "foo" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-missing-module-specifier.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-missing-module-specifier.module.js: -------------------------------------------------------------------------------- 1 | import foo 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-module-specifier.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default-module-specifier.module.js: -------------------------------------------------------------------------------- 1 | import foo from bar; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected token default","description":"Unexpected token default"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-default.module.js: -------------------------------------------------------------------------------- 1 | import default from "foo" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-keyword.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-keyword.module.js: -------------------------------------------------------------------------------- 1 | import { for } from "iteration" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-missing-comma.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token {","description":"Unexpected token {"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-missing-comma.module.js: -------------------------------------------------------------------------------- 1 | import foo { bar } from "bar"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-missing-module-specifier.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":19,"lineNumber":1,"column":20,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-missing-module-specifier.module.js: -------------------------------------------------------------------------------- 1 | import { foo, bar } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-module-specifier.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-module-specifier.module.js: -------------------------------------------------------------------------------- 1 | export {foo} from bar 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-after-named.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-after-named.module.js: -------------------------------------------------------------------------------- 1 | import {bar}, {foo} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-after-namespace.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-after-namespace.module.js: -------------------------------------------------------------------------------- 1 | import * as foo, {bar} from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-as-missing-from.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-named-as-missing-from.module.js: -------------------------------------------------------------------------------- 1 | import {default as foo} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-namespace-after-named.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-namespace-after-named.module.js: -------------------------------------------------------------------------------- 1 | import {bar}, * as foo from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-namespace-missing-as.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Unexpected token","description":"Unexpected token"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-namespace-missing-as.module.js: -------------------------------------------------------------------------------- 1 | import * from "foo" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-null.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-null.module.js: -------------------------------------------------------------------------------- 1 | import { null } from "null" 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-specifiers.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/import-declaration/invalid-import-specifiers.module.js: -------------------------------------------------------------------------------- 1 | import foo, from "bar"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/for_let_in.js: -------------------------------------------------------------------------------- 1 | for (let in x) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_complex_binding_without_init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":7,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_complex_binding_without_init.js: -------------------------------------------------------------------------------- 1 | let [] 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_const.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token const","description":"Unexpected token const"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_const.js: -------------------------------------------------------------------------------- 1 | const const; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_forin.failure.json: -------------------------------------------------------------------------------- 1 | {"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected token in","description":"Unexpected token in"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_forin.js: -------------------------------------------------------------------------------- 1 | for (const x = 0 in y){} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_const_let.js: -------------------------------------------------------------------------------- 1 | const let 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_const_declarations.failure.json: -------------------------------------------------------------------------------- 1 | {"index":32,"lineNumber":1,"column":33,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_const_declarations.js: -------------------------------------------------------------------------------- 1 | for (const x = 1, y = 2, z = 3, let = 0;;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_const_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_const_let.js: -------------------------------------------------------------------------------- 1 | for (const let = 1;;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_declarations.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_declarations.js: -------------------------------------------------------------------------------- 1 | for (let x, y, z, let;;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_init.js: -------------------------------------------------------------------------------- 1 | for (let x, y, z, let = 1;;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_let.js: -------------------------------------------------------------------------------- 1 | for (let let;;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_pattern.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_for_let_pattern.js: -------------------------------------------------------------------------------- 1 | for (let [let];;;) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_forin_const_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_forin_const_let.js: -------------------------------------------------------------------------------- 1 | for (const let in y); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_forin_let_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_forin_let_let.js: -------------------------------------------------------------------------------- 1 | for (let let in x); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_declarations.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_declarations.js: -------------------------------------------------------------------------------- 1 | let x, y, z, let; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_for_in.failure.json: -------------------------------------------------------------------------------- 1 | {"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Unexpected token in","description":"Unexpected token in"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_for_in.js: -------------------------------------------------------------------------------- 1 | 'use strict'; for (let in z) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_forin.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected token in","description":"Unexpected token in"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_forin.js: -------------------------------------------------------------------------------- 1 | for (let x = 0 in y){} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_init.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_init.js: -------------------------------------------------------------------------------- 1 | let x, y, z, let = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":4,"lineNumber":1,"column":5,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_let_let.js: -------------------------------------------------------------------------------- 1 | let let; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_strict_const_const.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: Unexpected token const","description":"Unexpected token const"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_strict_const_const.js: -------------------------------------------------------------------------------- 1 | "use strict"; const const = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_strict_const_let.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: let is disallowed as a lexically bound name","description":"let is disallowed as a lexically bound name"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_strict_const_let.js: -------------------------------------------------------------------------------- 1 | "use strict"; const let = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_1.failure.json: -------------------------------------------------------------------------------- 1 | {"index":7,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_1.js: -------------------------------------------------------------------------------- 1 | let x, 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_2.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_2.js: -------------------------------------------------------------------------------- 1 | let x,; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_3.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_3.js: -------------------------------------------------------------------------------- 1 | let x, y, ; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_4.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":3,"column":1,"message":"Error: Line 3: Unexpected end of input","description":"Unexpected end of input"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_4.js: -------------------------------------------------------------------------------- 1 | let x, 2 | y = 3, 3 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_5.failure.json: -------------------------------------------------------------------------------- 1 | {"index":13,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_5.js: -------------------------------------------------------------------------------- 1 | const x = 0, 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_6.failure.json: -------------------------------------------------------------------------------- 1 | {"index":19,"lineNumber":1,"column":20,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_6.js: -------------------------------------------------------------------------------- 1 | const x = 0, y = 1,; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_7.failure.json: -------------------------------------------------------------------------------- 1 | {"index":27,"lineNumber":4,"column":1,"message":"Error: Line 4: Unexpected end of input","description":"Unexpected end of input"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/invalid_trailing_comma_7.js: -------------------------------------------------------------------------------- 1 | const x = 0, 2 | y = 1, 3 | 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/let_assign.js: -------------------------------------------------------------------------------- 1 | let = 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/let_identifier.js: -------------------------------------------------------------------------------- 1 | let; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/let_member.js: -------------------------------------------------------------------------------- 1 | let.let = foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/migrated_0000.js: -------------------------------------------------------------------------------- 1 | switch (answer) { 2 | case 42: const t = 42; break; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/lexical-declaration/module_let.module.js: -------------------------------------------------------------------------------- 1 | let x; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/assign-new-target.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | const x = new.target; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/invalid-dots.failure.json: -------------------------------------------------------------------------------- 1 | {"index":29,"lineNumber":1,"column":30,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/invalid-dots.js: -------------------------------------------------------------------------------- 1 | var x = function() { y = new..target; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/invalid-new-target.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/invalid-new-target.js: -------------------------------------------------------------------------------- 1 | var x = new.target; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/new-new-target.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | new new.target; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/new-target-declaration.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | new.target; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/new-target-expression.js: -------------------------------------------------------------------------------- 1 | var f = function() { 2 | new.target; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/new-target-invoke.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | new.target(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/new-target-precedence.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | new new.target()(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/unknown-property.failure.json: -------------------------------------------------------------------------------- 1 | {"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/meta-property/unknown-property.js: -------------------------------------------------------------------------------- 1 | var f = function() { new.unknown_property; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/method-definition/migrated_0000.js: -------------------------------------------------------------------------------- 1 | x = {method() { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/method-definition/migrated_0001.js: -------------------------------------------------------------------------------- 1 | x = {method(test) { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/method-definition/migrated_0002.js: -------------------------------------------------------------------------------- 1 | x = {'method'() { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/method-definition/migrated_0003.js: -------------------------------------------------------------------------------- 1 | x = {get() { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/method-definition/migrated_0004.js: -------------------------------------------------------------------------------- 1 | x = {set() { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-getter-literal-identifier.failure.json: -------------------------------------------------------------------------------- 1 | {"index":48,"lineNumber":1,"column":49,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-getter-literal-identifier.js: -------------------------------------------------------------------------------- 1 | ({ get __proto(){}, "__proto__": null, __proto__: null, }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-identifier-literal.failure.json: -------------------------------------------------------------------------------- 1 | {"index":31,"lineNumber":1,"column":32,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-identifier-literal.js: -------------------------------------------------------------------------------- 1 | ({ __proto__: null, "__proto__": null }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-identifiers.failure.json: -------------------------------------------------------------------------------- 1 | {"index":29,"lineNumber":1,"column":30,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-identifiers.js: -------------------------------------------------------------------------------- 1 | ({ __proto__: null, __proto__: null }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-literal-identifier.failure.json: -------------------------------------------------------------------------------- 1 | {"index":31,"lineNumber":1,"column":32,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-literal-identifier.js: -------------------------------------------------------------------------------- 1 | ({ "__proto__": null, __proto__: null }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-literals.failure.json: -------------------------------------------------------------------------------- 1 | {"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-literals.js: -------------------------------------------------------------------------------- 1 | ({ "__proto__": null, '__proto__': null }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-setter-literal-identifier.failure.json: -------------------------------------------------------------------------------- 1 | {"index":51,"lineNumber":1,"column":52,"message":"Error: Line 1: Duplicate __proto__ fields are not allowed in object literals","description":"Duplicate __proto__ fields are not allowed in object literals"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/invalid-proto-setter-literal-identifier.js: -------------------------------------------------------------------------------- 1 | ({ set __proto__(x){}, "__proto__": null, __proto__: null, }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-identifier-getter-setter.js: -------------------------------------------------------------------------------- 1 | ({__proto__: null, get __proto__() {}, set __proto__(x) {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-identifier-getter.js: -------------------------------------------------------------------------------- 1 | ({__proto__: null, get __proto__() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-identifier-method.js: -------------------------------------------------------------------------------- 1 | ({__proto__: null, __proto__() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-identifier-setter.js: -------------------------------------------------------------------------------- 1 | ({__proto__: null, set __proto__(x) {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-identifier-shorthand.js: -------------------------------------------------------------------------------- 1 | ({__proto__: null, __proto__}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-literal-getter-setter.js: -------------------------------------------------------------------------------- 1 | ({'__proto__': null, get '__proto__'() {}, set '__proto__'(x) {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-literal-getter.js: -------------------------------------------------------------------------------- 1 | ({'__proto__': null, get '__proto__'() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-literal-method.js: -------------------------------------------------------------------------------- 1 | ({'__proto__': null, __proto__() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-literal-setter.js: -------------------------------------------------------------------------------- 1 | ({'__proto__': null, set '__proto__'(x) {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-literal-shorthand.js: -------------------------------------------------------------------------------- 1 | ({'__proto__': null, __proto__}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-shorthand-assignments.js: -------------------------------------------------------------------------------- 1 | ({__proto__ = 0, __proto__ = 0} = {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-shorthand-identifier.js: -------------------------------------------------------------------------------- 1 | ({__proto__, __proto__: null}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-shorthand-literal.js: -------------------------------------------------------------------------------- 1 | ({__proto__, '__proto__': null}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-initialiser/proto-shorthands.js: -------------------------------------------------------------------------------- 1 | ({__proto__, __proto__}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/object-literal-property-value-shorthand/migrated_0000.js: -------------------------------------------------------------------------------- 1 | x = {y, z}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0000.js: -------------------------------------------------------------------------------- 1 | 00; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0001.js: -------------------------------------------------------------------------------- 1 | 0o0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0002.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | 'use strict'; 0o0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0003.js: -------------------------------------------------------------------------------- 1 | 0o2; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0004.js: -------------------------------------------------------------------------------- 1 | 0o12; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0005.js: -------------------------------------------------------------------------------- 1 | 0O0; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/octal-integer-literal/migrated_0006.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | 'use strict'; 0O0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-delete.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 27, 3 | "lineNumber": 2, 4 | "column": 9, 5 | "message": "Error: Line 2: Delete of an unqualified identifier in strict mode.", 6 | "description": "Delete of an unqualified identifier in strict mode." 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-delete.module.js: -------------------------------------------------------------------------------- 1 | import x from "x"; 2 | delete x; 3 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-export-if.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 7, 3 | "lineNumber": 1, 4 | "column": 8, 5 | "message": "Error: Line 1: Unexpected token if", 6 | "description": "Unexpected token if" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-export-if.module.js: -------------------------------------------------------------------------------- 1 | export if foo = 1; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-export-in-function.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 14, 3 | "lineNumber": 1, 4 | "column": 15, 5 | "message": "Error: Line 1: Unexpected token", 6 | "description": "Unexpected token" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-export-in-function.module.js: -------------------------------------------------------------------------------- 1 | function x() { 2 | export default friends; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-import-in-function.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 14, 3 | "lineNumber": 1, 4 | "column": 15, 5 | "message": "Error: Line 1: Unexpected token", 6 | "description": "Unexpected token" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-import-in-function.module.js: -------------------------------------------------------------------------------- 1 | function x() { 2 | import foo from "foo"; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-with.module.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 26, 3 | "lineNumber": 3, 4 | "column": 27, 5 | "message": "Error: Line 3: Strict mode code may not include a with statement", 6 | "description": "Strict mode code may not include a with statement" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/module/invalid-with.module.js: -------------------------------------------------------------------------------- 1 | import house from "house"; 2 | 3 | with (house) { 4 | console.log(roof); 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/script/invalid-export-declaration.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 0, 3 | "lineNumber": 1, 4 | "column": 1, 5 | "message": "Error: Line 1: Unexpected token", 6 | "description": "Unexpected token" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/script/invalid-export-declaration.js: -------------------------------------------------------------------------------- 1 | export default function () {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/script/invalid-import-declaration.failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": 0, 3 | "lineNumber": 1, 4 | "column": 1, 5 | "message": "Error: Line 1: Unexpected token", 6 | "description": "Unexpected token" 7 | } 8 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/program/script/invalid-import-declaration.js: -------------------------------------------------------------------------------- 1 | import foo from "foo"; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/arrow-rest-parameter-array.js: -------------------------------------------------------------------------------- 1 | (a, ...[b]) => c 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/arrow-rest-parameter-object.js: -------------------------------------------------------------------------------- 1 | (a, ...{b}) => c 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/function-declaration.js: -------------------------------------------------------------------------------- 1 | function f(a, ...b) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/function-expression.js: -------------------------------------------------------------------------------- 1 | f = function(a, ...b) {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/invalid-setter-rest.js: -------------------------------------------------------------------------------- 1 | x = { set f(...y) {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/object-method.js: -------------------------------------------------------------------------------- 1 | o = {f(a, ...b) {}}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/object-shorthand-method.js: -------------------------------------------------------------------------------- 1 | x = {method(...test) { }}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/rest-parameter-array.js: -------------------------------------------------------------------------------- 1 | function f(...[a]) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/rest-parameter/rest-parameter-object.js: -------------------------------------------------------------------------------- 1 | function f(...{a}) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/call-multi-spread.js: -------------------------------------------------------------------------------- 1 | f(...x, ...y, ...z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/call-spread-default.js: -------------------------------------------------------------------------------- 1 | f(g, ...h = i); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/call-spread-first.js: -------------------------------------------------------------------------------- 1 | f(...x, y, z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/call-spread-number.js: -------------------------------------------------------------------------------- 1 | f(....5); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/call-spread.js: -------------------------------------------------------------------------------- 1 | f(...g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-dot-dot.failure.json: -------------------------------------------------------------------------------- 1 | {"index":2,"lineNumber":1,"column":3,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-dot-dot.js: -------------------------------------------------------------------------------- 1 | f(..g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-dots.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-dots.js: -------------------------------------------------------------------------------- 1 | f(....g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-spreads.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token ...","description":"Unexpected token ..."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-call-spreads.js: -------------------------------------------------------------------------------- 1 | f(... ... g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-dot-dot.failure.json: -------------------------------------------------------------------------------- 1 | {"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-dot-dot.js: -------------------------------------------------------------------------------- 1 | new f(..g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-dots.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-dots.js: -------------------------------------------------------------------------------- 1 | new f(....g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-spreads.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token ...","description":"Unexpected token ..."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/invalid-new-spreads.js: -------------------------------------------------------------------------------- 1 | new f(... ... g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/new-multi-spread.js: -------------------------------------------------------------------------------- 1 | new f(...x, ...y, ...z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/new-spread-default.js: -------------------------------------------------------------------------------- 1 | new f(g, ...h = i); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/new-spread-first.js: -------------------------------------------------------------------------------- 1 | new f(...x, y, z); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/new-spread-number.js: -------------------------------------------------------------------------------- 1 | new f(....5); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/spread-element/new-spread.js: -------------------------------------------------------------------------------- 1 | new f(...g); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/arrow_super.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | constructor() { 3 | () => super(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/constructor_super.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | constructor() { 3 | super(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_access.failure.json: -------------------------------------------------------------------------------- 1 | {"index":54,"lineNumber":3,"column":15,"message":"Error: Line 3: Unexpected token )","description":"Unexpected token )"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_access.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | constructor() { 3 | (super)(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_id.failure.json: -------------------------------------------------------------------------------- 1 | {"index":32,"lineNumber":2,"column":23,"message":"Error: Line 2: Unexpected token +","description":"Unexpected token +"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_id.js: -------------------------------------------------------------------------------- 1 | class A { 2 | foo() { new super + 3 } 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_not_inside_function.failure.json: -------------------------------------------------------------------------------- 1 | {"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Unexpected reserved word","description":"Unexpected reserved word"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/invalid_super_not_inside_function.js: -------------------------------------------------------------------------------- 1 | var x = super(); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/new_super.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | foo() { 3 | new super.bar(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/super_computed.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | X() { 3 | return super[1]; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/super-property/super_member.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | X() { 3 | return super.y; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/after-switch.failure.json: -------------------------------------------------------------------------------- 1 | {"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected quasi test","description":"Unexpected quasi test"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/after-switch.js: -------------------------------------------------------------------------------- 1 | switch `test` -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/dollar-sign.js: -------------------------------------------------------------------------------- 1 | `$`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/escape-sequences.source.js: -------------------------------------------------------------------------------- 1 | var source = '`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/invalid-escape.failure.json: -------------------------------------------------------------------------------- 1 | {"index":0,"lineNumber":1,"column":1,"message":"Error: Line 1: Octal literals are not allowed in template strings.","description":"Octal literals are not allowed in template strings."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/invalid-escape.js: -------------------------------------------------------------------------------- 1 | `\1`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/invalid-hex-escape-sequence.failure.json: -------------------------------------------------------------------------------- 1 | {"index":0,"lineNumber":1,"column":1,"message":"Error: Line 1: Invalid hexadecimal escape sequence","description":"Invalid hexadecimal escape sequence"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/invalid-hex-escape-sequence.js: -------------------------------------------------------------------------------- 1 | `\x{1}`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/line-terminators.source.js: -------------------------------------------------------------------------------- 1 | var source = '`\n\r\n`'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/literal-escape-sequences.source.js: -------------------------------------------------------------------------------- 1 | var source = '`\\u{000042}\\u0042\\x42\\A\\0`'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/nested-function-with-object-pattern.js: -------------------------------------------------------------------------------- 1 | `${function() { 2 | const {x} = y; 3 | }}`; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/new-expression.js: -------------------------------------------------------------------------------- 1 | new raw`42`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/octal-literal.failure.json: -------------------------------------------------------------------------------- 1 | {"index":0,"lineNumber":1,"column":1,"message":"Error: Line 1: Octal literals are not allowed in template strings.","description":"Octal literals are not allowed in template strings."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/octal-literal.js: -------------------------------------------------------------------------------- 1 | `\00`; -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/strict-octal-literal.failure.json: -------------------------------------------------------------------------------- 1 | {"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Octal literals are not allowed in template strings.","description":"Octal literals are not allowed in template strings."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/strict-octal-literal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; `\00`; -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/tagged-interpolation.js: -------------------------------------------------------------------------------- 1 | raw`hello ${name}`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/tagged-nested-with-object-literal.js: -------------------------------------------------------------------------------- 1 | raw`token ${`nested ${'deeply' + {}} blah`}`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/tagged.js: -------------------------------------------------------------------------------- 1 | raw`42`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed-interpolation.failure.json: -------------------------------------------------------------------------------- 1 | {"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed-interpolation.js: -------------------------------------------------------------------------------- 1 | `hello ${10;test` -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed-nested.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed-nested.js: -------------------------------------------------------------------------------- 1 | `hello ${10 `test` -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed.failure.json: -------------------------------------------------------------------------------- 1 | {"index":5,"lineNumber":1,"column":6,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/unclosed.js: -------------------------------------------------------------------------------- 1 | `test -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/template-literals/untagged.js: -------------------------------------------------------------------------------- 1 | `42`; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/unicode-code-point-escape-sequence/migrated_0000.source.js: -------------------------------------------------------------------------------- 1 | var source = '"\\u{714E}\\u{8336}"'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/unicode-code-point-escape-sequence/migrated_0001.source.js: -------------------------------------------------------------------------------- 1 | var source = '"\\u{20BB7}\\u{91CE}\\u{5BB6}"'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/unicode-code-point-escape-sequence/migrated_0002.source.js: -------------------------------------------------------------------------------- 1 | var source = '"\\u{00000000034}"'; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-binding-property.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Unexpected number","description":"Unexpected number"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-binding-property.js: -------------------------------------------------------------------------------- 1 | var {x: y = yield 3} = z; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-expression.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: Unexpected number","description":"Unexpected number"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-expression.js: -------------------------------------------------------------------------------- 1 | (function() { yield 3; }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-default.failure.json: -------------------------------------------------------------------------------- 1 | {"index":31,"lineNumber":1,"column":32,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-default.js: -------------------------------------------------------------------------------- 1 | function* g() { (x = yield 42) => {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-parameter.js: -------------------------------------------------------------------------------- 1 | function *g(){ (yield) => 42 } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-parameters.failure.json: -------------------------------------------------------------------------------- 1 | {"index":32,"lineNumber":1,"column":33,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-arrow-parameters.js: -------------------------------------------------------------------------------- 1 | function *g(){ (a, b, c, yield) => 42 } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-catch.failure.json: -------------------------------------------------------------------------------- 1 | {"index":30,"lineNumber":1,"column":31,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-catch.js: -------------------------------------------------------------------------------- 1 | function *g() { try {} catch (yield) {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":26,"lineNumber":1,"column":27,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-declaration.js: -------------------------------------------------------------------------------- 1 | function *g() { function *yield(){} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-export-default.module.failure.json: -------------------------------------------------------------------------------- 1 | {"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-export-default.module.js: -------------------------------------------------------------------------------- 1 | export default function *yield() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-name.js: -------------------------------------------------------------------------------- 1 | (function*yield(){}) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-parameter.js: -------------------------------------------------------------------------------- 1 | (function *(yield){}) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-rest.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-expression-rest.js: -------------------------------------------------------------------------------- 1 | (function *(x, ...yield){}) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-function-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-function-declaration.js: -------------------------------------------------------------------------------- 1 | function *g() { function yield() {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-lexical-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-lexical-declaration.js: -------------------------------------------------------------------------------- 1 | function *g() { let yield; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-member-expression.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-member-expression.js: -------------------------------------------------------------------------------- 1 | function *g() { return yield.x; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-parameter.js: -------------------------------------------------------------------------------- 1 | function *g(yield){} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-rest.failure.json: -------------------------------------------------------------------------------- 1 | {"index":24,"lineNumber":1,"column":25,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-rest.js: -------------------------------------------------------------------------------- 1 | function *g(a, b, c, ...yield){} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-strict-function-expression.failure.json: -------------------------------------------------------------------------------- 1 | {"index":46,"lineNumber":1,"column":47,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-strict-function-expression.js: -------------------------------------------------------------------------------- 1 | "use strict"; function *g(){ var y = function yield(){}; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-strict-function-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":47,"lineNumber":1,"column":48,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-strict-function-parameter.js: -------------------------------------------------------------------------------- 1 | "use strict"; function *g() { var z = function(yield) {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-variable-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":20,"lineNumber":1,"column":21,"message":"Error: Line 1: Unexpected token yield","description":"Unexpected token yield"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-generator-variable-declaration.js: -------------------------------------------------------------------------------- 1 | function *g() { var yield; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-object-methods.js: -------------------------------------------------------------------------------- 1 | function* a() { 2 | ({b() { 3 | yield; 4 | }}); 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-object-property-getter.js: -------------------------------------------------------------------------------- 1 | function* a() { 2 | ({get b() { 3 | yield; 4 | }}); 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-object-property-setter.js: -------------------------------------------------------------------------------- 1 | function* a() { 2 | ({set b(c) { 3 | yield; 4 | }}); 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-array-pattern.failure.json: -------------------------------------------------------------------------------- 1 | {"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-array-pattern.js: -------------------------------------------------------------------------------- 1 | "use strict"; ([yield] = x) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-arrow-parameter-default.failure.json: -------------------------------------------------------------------------------- 1 | {"index":19,"lineNumber":1,"column":20,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-arrow-parameter-default.js: -------------------------------------------------------------------------------- 1 | "use strict"; (x = yield) => {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-arrow-parameter-name.failure.json: -------------------------------------------------------------------------------- 1 | {"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-arrow-parameter-name.js: -------------------------------------------------------------------------------- 1 | "use strict"; (yield) => 42 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-binding-element.failure.json: -------------------------------------------------------------------------------- 1 | {"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-binding-element.js: -------------------------------------------------------------------------------- 1 | "use strict"; var { x: yield } = foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-catch-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-catch-parameter.js: -------------------------------------------------------------------------------- 1 | "use strict"; try {} catch (yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-formal-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-formal-parameter.js: -------------------------------------------------------------------------------- 1 | "use strict"; function f(yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-function-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":9,"lineNumber":1,"column":10,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-function-declaration.js: -------------------------------------------------------------------------------- 1 | function yield(){ "use strict"; } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-function-expression.failure.json: -------------------------------------------------------------------------------- 1 | {"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-function-expression.js: -------------------------------------------------------------------------------- 1 | (function yield(){ "use strict"; }) 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-identifier.failure.json: -------------------------------------------------------------------------------- 1 | {"index":29,"lineNumber":1,"column":30,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-identifier.js: -------------------------------------------------------------------------------- 1 | "use strict"; function f() { yield } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-lexical-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-lexical-declaration.js: -------------------------------------------------------------------------------- 1 | "use strict"; let yield = 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-rest-parameter.failure.json: -------------------------------------------------------------------------------- 1 | {"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-rest-parameter.js: -------------------------------------------------------------------------------- 1 | "use strict"; function f(...yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-variable-declaration.failure.json: -------------------------------------------------------------------------------- 1 | {"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"} -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/invalid-yield-strict-variable-declaration.js: -------------------------------------------------------------------------------- 1 | "use strict"; var yield; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/ternary-yield.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | x ? yield : y; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-array.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield [x]; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-bitnot.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield ~x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-class.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield class x {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-delete.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield delete x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-function.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield function() {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-group.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield (x); 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-let.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield let; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-minus.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield -x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-minusminus.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield --x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-new.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield new X(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-not.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield !x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-object.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield {x}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-plus.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield +x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-plusplus.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield ++x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-regexp1.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield /x/i; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-regexp2.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield /=x/i; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-super.js: -------------------------------------------------------------------------------- 1 | class A { 2 | * b() { 3 | yield super.c(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-this.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield this; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-typeof.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield typeof x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arg-void.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield void x; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-array-pattern.js: -------------------------------------------------------------------------------- 1 | ([yield] = x); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arrow-concise-body.js: -------------------------------------------------------------------------------- 1 | x => x * yield; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arrow-function-body.js: -------------------------------------------------------------------------------- 1 | z => { 2 | yield + z; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arrow-parameter-default.js: -------------------------------------------------------------------------------- 1 | (x = yield) => {}; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-arrow-parameter-name.js: -------------------------------------------------------------------------------- 1 | yield => 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-binding-element.js: -------------------------------------------------------------------------------- 1 | var {x: yield} = foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-binding-property.js: -------------------------------------------------------------------------------- 1 | var {yield: x} = foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-call-expression-property.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | obj.yield(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-catch-parameter.js: -------------------------------------------------------------------------------- 1 | try {} catch (yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-expression-precedence.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield a=b, yield* c=d, e; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-function-declaration-formal-parameter.js: -------------------------------------------------------------------------------- 1 | function f(yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-function-declaration.js: -------------------------------------------------------------------------------- 1 | function yield() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-function-expression-parameter.js: -------------------------------------------------------------------------------- 1 | (function(yield) {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-function-expression.js: -------------------------------------------------------------------------------- 1 | (function yield() {}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-arrow-concise-body.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | x => x * yield; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-arrow-default.js: -------------------------------------------------------------------------------- 1 | function *g() { (x = yield) => {} } 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-arrow-function-body.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | z => { 3 | yield + z; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-declaration.js: -------------------------------------------------------------------------------- 1 | function* yield() {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-default-parameter.js: -------------------------------------------------------------------------------- 1 | function *g(x = yield){} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-function-expression.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | const y = function yield() {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-function-parameter.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | const z = function(yield) {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-method.js: -------------------------------------------------------------------------------- 1 | ({* yield() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-generator-parameter-object-pattern.js: -------------------------------------------------------------------------------- 1 | function* g({yield: y}) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-lexical-declaration.js: -------------------------------------------------------------------------------- 1 | const yield = 42; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-member-expression-property.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield obj.yield; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-method.js: -------------------------------------------------------------------------------- 1 | ({yield() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-parameter-object-pattern.js: -------------------------------------------------------------------------------- 1 | function f({yield: y}) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-rest-parameter.js: -------------------------------------------------------------------------------- 1 | function f(...yield) {} 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-strict-binding-property.js: -------------------------------------------------------------------------------- 1 | 'use strict'; var {yield: x} = foo; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-strict-method.js: -------------------------------------------------------------------------------- 1 | 'use strict'; ({yield() {}}); 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-super-property.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | X() { 3 | super.yield; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-variable-declaration.js: -------------------------------------------------------------------------------- 1 | var yield; 2 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-yield-expression-delegate.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield* yield; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/ES6/yield/yield-yield-expression.js: -------------------------------------------------------------------------------- 1 | function* g() { 2 | yield yield; 3 | } 4 | -------------------------------------------------------------------------------- /packages/es-grammars/test/data/esprima/foo.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/packages/es-grammars/test/data/esprima/foo.mjs -------------------------------------------------------------------------------- /packages/labrat/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "test": "node --test" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/ohm-js/extras/index.mjs: -------------------------------------------------------------------------------- 1 | export {getLineAndColumnMessage, getLineAndColumn} from '../src/util.js'; 2 | export {VisitorFamily} from './VisitorFamily.js'; 3 | export {semanticsForToAST, toAST} from './semantics-toAST.js'; 4 | export {extractExamples} from './extractExamples.js'; 5 | -------------------------------------------------------------------------------- /packages/ohm-js/index.mjs: -------------------------------------------------------------------------------- 1 | export * from './src/main.js'; 2 | -------------------------------------------------------------------------------- /packages/ohm-js/scripts/prebootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cp -p dist/ohm-grammar.js dist/ohm-grammar.js.old 6 | cp -p dist/built-in-rules.js dist/built-in-rules.js.old 7 | -------------------------------------------------------------------------------- /packages/ohm-js/scripts/prebuild.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | 3 | const {version} = JSON.parse(fs.readFileSync('package.json', 'utf-8')); 4 | fs.writeFileSync( 5 | './src/version.js', 6 | `// Generated by scripts/prebuild.js\nexport const version = '${version}';\n`, 7 | ); 8 | -------------------------------------------------------------------------------- /packages/ohm-js/scripts/update-contributors: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "👫 Updating the list of contributors..." 4 | json -I -f "package.json" -e "this.contributors=[$(./scripts/get-contributors)]" 5 | -------------------------------------------------------------------------------- /packages/ohm-js/src/deferredInit.js: -------------------------------------------------------------------------------- 1 | import './grammarDeferredInit.js'; 2 | import './semanticsDeferredInit.js'; 3 | -------------------------------------------------------------------------------- /packages/ohm-js/src/grammarDeferredInit.js: -------------------------------------------------------------------------------- 1 | import {Grammar} from './Grammar.js'; 2 | import BuiltInRules from '../dist/built-in-rules.js'; 3 | 4 | Grammar.BuiltInRules = BuiltInRules; 5 | -------------------------------------------------------------------------------- /packages/ohm-js/src/version.js: -------------------------------------------------------------------------------- 1 | // Generated by scripts/prebuild.js 2 | export const version = '17.1.0'; 3 | -------------------------------------------------------------------------------- /packages/ohm-js/test/data/arithmetic.ohm: -------------------------------------------------------------------------------- 1 | Arithmetic { 2 | Exp 3 | = AddExp 4 | 5 | AddExp 6 | = AddExp "+" PriExp -- plus 7 | | AddExp "-" PriExp -- minus 8 | | PriExp 9 | 10 | PriExp 11 | = "(" Exp ")" -- paren 12 | | number 13 | 14 | number 15 | = digit+ 16 | } -------------------------------------------------------------------------------- /packages/ohm-js/test/data/myGrammar.ohm: -------------------------------------------------------------------------------- 1 | G {foo = end} 2 | -------------------------------------------------------------------------------- /packages/ohm-js/test/snapshots/test-grammar.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/packages/ohm-js/test/snapshots/test-grammar.js.snap -------------------------------------------------------------------------------- /packages/packaging-tests/.gitignore: -------------------------------------------------------------------------------- 1 | greeting.ohm-bundle.* 2 | dist/* 3 | -------------------------------------------------------------------------------- /packages/packaging-tests/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import resolve from '@rollup/plugin-node-resolve'; 2 | 3 | export default { 4 | input: 'src/index.rollup.js', 5 | output: { 6 | file: 'dist/main-rollup.js', 7 | format: 'iife' 8 | }, 9 | plugins: [resolve({modulesOnly: true})] 10 | }; 11 | -------------------------------------------------------------------------------- /packages/packaging-tests/src/greeting-esm.ohm: -------------------------------------------------------------------------------- 1 | Greeting { 2 | hello = "Hello!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/packaging-tests/src/greeting-esm.ohm-bundle.js: -------------------------------------------------------------------------------- 1 | import {makeRecipe} from 'ohm-js';const result=makeRecipe(["grammar",{"source":"Greeting {\n hello = \"Hello!\"\n}"},"Greeting",null,"hello",{"hello":["define",{"sourceInterval":[13,29]},null,[],["terminal",{"sourceInterval":[21,29]},"Hello!"]]}]);export default result; -------------------------------------------------------------------------------- /packages/packaging-tests/src/greeting.ohm: -------------------------------------------------------------------------------- 1 | Greeting { 2 | hello = "Hello!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/packaging-tests/src/index.rollup.js: -------------------------------------------------------------------------------- 1 | import greeting from './greeting-esm.ohm-bundle'; 2 | 3 | // eslint-disable-next-line no-console 4 | console.log(greeting.match('Hello!').succeeded() ? 'success!' : 'oh no'); 5 | -------------------------------------------------------------------------------- /packages/packaging-tests/src/index.webpack.js: -------------------------------------------------------------------------------- 1 | import greeting from './greeting.ohm-bundle'; 2 | 3 | // eslint-disable-next-line no-console 4 | console.log(greeting.match('Hello!').succeeded() ? 'success!' : 'oh no'); 5 | -------------------------------------------------------------------------------- /packages/packaging-tests/tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/packaging-tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext", 5 | "module": "commonjs", 6 | "moduleResolution": "node" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/packaging-tests/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mode: 'production', 3 | entry: './src/index.webpack.js', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/wasm/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | test/go/testmain 3 | -------------------------------------------------------------------------------- /packages/wasm/.mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | node = "24" 3 | -------------------------------------------------------------------------------- /packages/wasm/test/data/_es5.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ohmjs/ohm/b368a35a867da6348d85fe0ae0be00b1b26eacf3/packages/wasm/test/data/_es5.wasm -------------------------------------------------------------------------------- /packages/wasm/test/go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/ohmjs/ohm/packages/wasm/test/go 2 | 3 | go 1.20 4 | 5 | require github.com/tetratelabs/wazero v1.6.0 6 | -------------------------------------------------------------------------------- /packages/wasm/test/go/go.sum: -------------------------------------------------------------------------------- 1 | github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g= 2 | github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'examples/ecmascript' 4 | - 'examples/es-module' 5 | - 'examples/markdown' 6 | - 'examples/indentation-sensitive' 7 | - 'examples/operators' 8 | - 'examples/simple-lisp' 9 | - 'examples/typescript' 10 | linkWorkspacePackages: true 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "outDir": "dist", 5 | "module": "commonjs", 6 | "declaration": true, 7 | "strict": true, 8 | "moduleResolution": "node" 9 | }, 10 | "files": ["index.d.ts", "test/test-typings.ts"] 11 | } 12 | --------------------------------------------------------------------------------